summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2010-08-05 06:06:46 +0200
committerRyan Dahl <ry@tinyclouds.org>2010-08-06 13:38:41 -0700
commitaaa1f451e6392a530c3e32a64d8b6ad4fece988a (patch)
treebe4c52f5b1286193ff7635a866c65bbf517f636d /lib
parent94914135dfa5b536e4bb341b2c1e47fd2b9d74bc (diff)
downloadnode-new-aaa1f451e6392a530c3e32a64d8b6ad4fece988a.tar.gz
Expose cwd option to child_process.exec()
Diffstat (limited to 'lib')
-rw-r--r--lib/child_process.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/child_process.js b/lib/child_process.js
index 54bb6671c1..d19a0c0119 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -28,6 +28,7 @@ exports.execFile = function (file /* args, options, callback */) {
, timeout: 0
, maxBuffer: 200*1024
, killSignal: 'SIGKILL'
+ , cwd: null
, env: null
};
var args, optionArg, callback;
@@ -55,7 +56,7 @@ exports.execFile = function (file /* args, options, callback */) {
}
}
- var child = spawn(file, args, {env: options.env});
+ var child = spawn(file, args, {cwd: options.cwd, env: options.env});
var stdout = "";
var stderr = "";
var killed = false;