Handle new ProcessGlobalArgsInternal function in node >19 (#1086)
* Handle new ProcessGlobalArgsInternal function in node >19 * Use 18.19.99 specifically * Update src/patches/disable-node-cli.ts Co-authored-by: Caleb Boyd <caleb.boyd@gmail.com> --------- Co-authored-by: Caleb Boyd <caleb.boyd@gmail.com>
This commit is contained in:
@@ -6,7 +6,14 @@ export default async function disableNodeCli(compiler: NexeCompiler, next: () =>
|
||||
return next()
|
||||
}
|
||||
|
||||
if (semverGt(compiler.target.version, '11.6.0')) {
|
||||
|
||||
if (semverGt(compiler.target.version, '18.99')) {
|
||||
await compiler.replaceInFileAsync(
|
||||
'src/node.cc',
|
||||
/(?<!static ExitCode )ProcessGlobalArgsInternal\(argv[^;]*;/gm,
|
||||
'ExitCode::kNoFailure;/*$&*/'
|
||||
)
|
||||
} else if (semverGt(compiler.target.version, '11.6.0')) {
|
||||
await compiler.replaceInFileAsync(
|
||||
'src/node.cc',
|
||||
/(?<!int )ProcessGlobalArgs\(argv[^;]*;/gm,
|
||||
|
||||
Reference in New Issue
Block a user