forked from nospaceships/node-os-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add support for Node.js v21 (#40)
Requires a patch as outlined in nodejs/node#52475
- Loading branch information
Showing
4 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff --git a/node_modules/node-gyp-build/bin.js b/node_modules/node-gyp-build/bin.js | ||
index 3fbcdf0..5aacdf4 100755 | ||
--- a/node_modules/node-gyp-build/bin.js | ||
+++ b/node_modules/node-gyp-build/bin.js | ||
@@ -27,7 +27,7 @@ function build () { | ||
] | ||
} catch (_) {} | ||
|
||
- proc.spawn(args[0], args.slice(1), { stdio: 'inherit' }).on('exit', function (code) { | ||
+ proc.spawn(args[0], args.slice(1), { stdio: 'inherit', ...(os.platform() === 'win32' ? { shell: true, windowsVerbatimArguments: true } : {}) }).on('exit', function (code) { | ||
if (code || !process.argv[3]) process.exit(code) | ||
exec(process.argv[3]).on('exit', function (code) { | ||
process.exit(code) | ||
@@ -53,7 +53,8 @@ function exec (cmd) { | ||
|
||
return proc.spawn(process.env.comspec || 'cmd.exe', ['/s', '/c', '"' + cmd + '"'], { | ||
windowsVerbatimArguments: true, | ||
- stdio: 'inherit' | ||
+ stdio: 'inherit', | ||
+ shell: true | ||
}) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters