Skip to content

Commit

Permalink
fix: Node.js 18.20.2, 20.12.2 以降の場合に Windows 環境で run, start, stop コマン…
Browse files Browse the repository at this point in the history
…ドを実行した時に spawn EINVAL エラーが出るようになっていたので spawn の options に shell: true を追加した
  • Loading branch information
h-sa committed Jun 27, 2024
1 parent 3af5c98 commit fece13a
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 fece13a

Please sign in to comment.