Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
var cp = require("child_process").exec;
cp("pwd", function(error, stdout, stderr) {
if (error !== null) console.error(error);
console.log(`pwd => ${stdout}`);
});
Specify the full path to pwd. If I'm not mistaken, child_process.spawn() ignores PATH under Windows.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question