child_process_uv: fix simple/test-child-process-cwd

This commit is contained in:
Ryan Dahl committed 2011-07-31 16:50:53 -07:00
1 parent 19a62589b2
commit ef767a152b
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -237,6 +237,7 @@ UVTEST += simple/test-tls-set-encoding
UVTEST += simple/test-child-process-exit-code
UVTEST += simple/test-child-process-buffering
UVTEST += simple/test-child-process-exec-cwd
UVTEST += simple/test-child-process-cwd
test-uv: all
+3 -1
View File
@@ -107,7 +107,9 @@ class ProcessWrap : public HandleWrap {
Local<Value> cwd_v = js_options->Get(String::New("cwd"));
if (!cwd_v.IsEmpty() && cwd_v->IsString()) {
String::Utf8Value cwd(cwd_v->ToString());
options.cwd = strdup(*cwd);
if (cwd.length() > 0) {
options.cwd = strdup(*cwd);
}
}
// options.env