Skip to content

Commit

Permalink
Use argv[0] to launch sub-scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Mäder <[email protected]>
  • Loading branch information
tsmaeder committed Jan 7, 2025
1 parent b3af23a commit ff7c76f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev-packages/private-re-exports/src/package-re-exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class PackageReExports {
// To get around this, we can spawn a sub NodeJS process that will run the asynchronous
// logic and then synchronously wait for the serialized result on the standard output.
const scriptPath = require.resolve('./bin-package-re-exports-from-package.js');
const { stdout } = cp.spawnSync(process.platform === 'win32' ? `"${process.argv0}"` : process.argv0, [...process.execArgv, scriptPath, packageName], {
const { stdout } = cp.spawnSync(process.platform === 'win32' ? `"${process.argv[0]}"` : process.argv[0], [...process.execArgv, scriptPath, packageName], {
env: {
ELECTRON_RUN_AS_NODE: '1'
},
Expand Down

0 comments on commit ff7c76f

Please sign in to comment.