diff --git a/index.js b/index.js index 26b0a48..238e244 100644 --- a/index.js +++ b/index.js @@ -2,11 +2,12 @@ var crypto = require('crypto') var EventEmitter = require('events').EventEmitter var fs = require('fs') var path = require('path') +var npmPath = require('npm-path') var os = require('os') var spawn = require('child_process').spawn var Step = require('step') -var PATH = process.env.PATH +var PATH = npmPath.PATH var emitter @@ -177,7 +178,7 @@ function clone(args, baseDir, privKey, cb) { } function addPath(str) { - PATH = PATH + ":" + str + PATH = PATH + npmPath.SEPARATOR + str } module.exports = { diff --git a/package.json b/package.json index adcc3d0..979ad8f 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,18 @@ "description": "Easy Node.JS Git wrapper with support for SSH keys", "version": "0.3.1", "homepage": "https://github.com/niallo/Gitane", - "keywords":["git", "ssh", "strider"], + "keywords": [ + "git", + "ssh", + "strider" + ], "repository": { "type": "git", "url": "git://github.com/niallo/Gitane.git" }, "main": "index.js", "dependencies": { + "npm-path": "^1.0.1", "step": "~0.0.5" }, "devDependencies": {