From a3478eb09964aa92a67555a4daf57117438f7894 Mon Sep 17 00:00:00 2001 From: pik Date: Tue, 27 Jun 2017 08:14:28 -0500 Subject: [PATCH] Check node version to determine which cwd to use --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c85536d..d96cec2 100755 --- a/index.js +++ b/index.js @@ -102,7 +102,7 @@ cmds.forEach(function (cmd) { cmd = "exec "+cmd; } var child = spawn(sh,[shFlag,cmd], { - cwd: process.cwd(), + cwd: process.versions.node < '8.0.0' ? process.cwd : process.cwd(), env: process.env, stdio: ['pipe', process.stdout, process.stderr] })