Skip to content

Commit ec96ec5

Browse files
committed
fix: update SEA command handling to use 'main.exe' instead of 'node.exe'
1 parent 1a8c70d commit ec96ec5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

nx-node-sea/src/plugin.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,13 @@ function getSeaCommands(options: {
202202
);
203203
const _blobPath = blobPath.replaceAll(posix.sep, win32.sep);
204204
return [
205-
`node -e "require('fs').copyFileSync(process.execPath, 'node.exe')"`,
206-
...(sign ? [`signtool remove /s 'node.exe' `] : []),
205+
'node --experimental-sea-config {projectRoot}/sea-config.json',
206+
`node -e "require('fs').copyFileSync(process.execPath, 'main.exe')"`,
207+
...(sign ? [`signtool remove /s 'main.exe' `] : []),
207208
// TODO: check if powershell or command prompt
208-
`npx postject node.exe NODE_SEA_BLOB ${_blobPath} \` --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8bß5df1996b2`,
209-
...(sign ? [`signtool sign /fd SHA256 node.exe`] : []),
210-
`mv node.exe ${_nodeBinPath}`,
209+
`npx postject main.exe NODE_SEA_BLOB ${_blobPath} \` --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8bß5df1996b2`,
210+
...(sign ? [`signtool sign /fd SHA256 main.exe`] : []),
211+
`mv main.exe ${_nodeBinPath}`,
211212
];
212213
} else {
213214
throw new Error(`Unsupported platform: ${platform}`);

0 commit comments

Comments
 (0)