Fix node path in bin wrappers

This commit is contained in:
Stéphan Kochen
2020-08-26 10:59:42 +02:00
parent a1fe6181f1
commit 5f1a03eefc
4 changed files with 7 additions and 7 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -60,14 +60,14 @@ export default class InstallBinCommand extends Command<CommandContext> {
switch (nodeLinker) {
case `pnp`:
script = binWrapperPnpTmpl
.replace(`@@NODE_PATH@@`, process.execPath)
.replace(`@@PNP_PATH@@`, pnpPath)
.replace(`@@SCRIPT_PATH@@`, scriptPath);
break;
case `node-modules`:
script = binWrapperNodeModulesTmpl.replace(
`@@SCRIPT_PATH@@`,
scriptPath
);
script = binWrapperNodeModulesTmpl
.replace(`@@NODE_PATH@@`, process.execPath)
.replace(`@@SCRIPT_PATH@@`, scriptPath);
break;
default:
throw Error(`Invalid nodeLinker ${nodeLinker}`);
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/sh
exec node '@@SCRIPT_PATH@@' "$@"
exec '@@NODE_PATH@@' '@@SCRIPT_PATH@@' "$@"
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/sh
exec node -r '@@PNP_PATH@@' '@@SCRIPT_PATH@@' "$@"
exec '@@NODE_PATH@@' -r '@@PNP_PATH@@' '@@SCRIPT_PATH@@' "$@"