Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node equivalent of bash exec

// no perfect equivalent.
// closest thing below.
// I don't know if error exit codes are passed through.
require("child_process").spawn('bash', ['./script.sh'], {
  cwd: process.cwd(),
  detached: true,
  stdio: "inherit"
});
 
PREVIOUS NEXT
Tagged: #node #equivalent #bash #exec
ADD COMMENT
Topic
Name
1+1 =