Skip to content

Commit

Permalink
Merge pull request #22 from lisb/hotfix/fix-run-start-stop-command
Browse files Browse the repository at this point in the history
fix: Node.js 18.20.2, 20.12.2 以降の場合に Windows 環境で run, start, stop コマンドを実行した時に spawn EINVAL エラーが出るようになっていたので spawn の options に shell: true を追加した
  • Loading branch information
krdlab authored Jun 27, 2024
2 parents 3af5c98 + fece13a commit 83dc68e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/daab-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ if (! auth.hasToken()) {

var cmd = process.platform === 'win32' ? 'bin\\hubot.cmd' : 'bin/hubot';
var hubot = spawn(cmd, ['run'].concat(process.argv.slice(2)), {
stdio: 'inherit'
stdio: 'inherit',
shell: true
});
3 changes: 2 additions & 1 deletion lib/daab-start.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ if (! auth.hasToken()) {
var cmd = process.platform === 'win32' ? 'bin\\hubot.cmd' : 'bin/hubot';
var hubot = spawn(cmd, ['start'].concat(process.argv.slice(2)), {
detached: true,
stdio: 'inherit'
stdio: 'inherit',
shell: true
});

hubot.unref();
3 changes: 2 additions & 1 deletion lib/daab-stop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ program

var cmd = process.platform === 'win32' ? 'bin\\hubot.cmd' : 'bin/hubot';
var hubot = spawn(cmd, ['stop'].concat(process.argv.slice(2)), {
stdio: 'inherit'
stdio: 'inherit',
shell: true
});

0 comments on commit 83dc68e

Please sign in to comment.