Browse Source

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

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
ef767a152b
  1. 1
      Makefile
  2. 2
      src/process_wrap.cc

1
Makefile

@ -237,6 +237,7 @@ UVTEST += simple/test-tls-set-encoding
UVTEST += simple/test-child-process-exit-code UVTEST += simple/test-child-process-exit-code
UVTEST += simple/test-child-process-buffering UVTEST += simple/test-child-process-buffering
UVTEST += simple/test-child-process-exec-cwd UVTEST += simple/test-child-process-exec-cwd
UVTEST += simple/test-child-process-cwd
test-uv: all test-uv: all

2
src/process_wrap.cc

@ -107,8 +107,10 @@ class ProcessWrap : public HandleWrap {
Local<Value> cwd_v = js_options->Get(String::New("cwd")); Local<Value> cwd_v = js_options->Get(String::New("cwd"));
if (!cwd_v.IsEmpty() && cwd_v->IsString()) { if (!cwd_v.IsEmpty() && cwd_v->IsString()) {
String::Utf8Value cwd(cwd_v->ToString()); String::Utf8Value cwd(cwd_v->ToString());
if (cwd.length() > 0) {
options.cwd = strdup(*cwd); options.cwd = strdup(*cwd);
} }
}
// options.env // options.env
Local<Value> env_v = js_options->Get(String::New("env")); Local<Value> env_v = js_options->Get(String::New("env"));

Loading…
Cancel
Save