📜  节点等效于 bash exec - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:55.788000             🧑  作者: Mango

代码示例1
// 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"
});