Как мы можем помочь?
< Все темы
Печать

Запуск в шелл (shelljs и spawn)

npm i shelljs

const shell = require('shelljs');
const spawn = require('child_process').spawn;

const cmd = './update.sh';
shell.exec(cmd);

spawn(cmd, {
   stdio: 'ignore',
   detached: true,
   env: process.env,
}).unref();
Оглавление