Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

cd doesn’t work inside childProcess

var cmd =  `ls
cd foo
ls`

var exec =  require('child_process').exec;

exec(cmd, function(err, stdout, stderr) {
        console.log(stdout);
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cd #work #childProcess
ADD COMMENT
Topic
Name
4+7 =