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) { switch (nodeLinker) {
case `pnp`: case `pnp`:
script = binWrapperPnpTmpl script = binWrapperPnpTmpl
.replace(`@@NODE_PATH@@`, process.execPath)
.replace(`@@PNP_PATH@@`, pnpPath) .replace(`@@PNP_PATH@@`, pnpPath)
.replace(`@@SCRIPT_PATH@@`, scriptPath); .replace(`@@SCRIPT_PATH@@`, scriptPath);
break; break;
case `node-modules`: case `node-modules`:
script = binWrapperNodeModulesTmpl.replace( script = binWrapperNodeModulesTmpl
`@@SCRIPT_PATH@@`, .replace(`@@NODE_PATH@@`, process.execPath)
scriptPath .replace(`@@SCRIPT_PATH@@`, scriptPath);
);
break; break;
default: default:
throw Error(`Invalid nodeLinker ${nodeLinker}`); throw Error(`Invalid nodeLinker ${nodeLinker}`);
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
exec node '@@SCRIPT_PATH@@' "$@" exec '@@NODE_PATH@@' '@@SCRIPT_PATH@@' "$@"
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
exec node -r '@@PNP_PATH@@' '@@SCRIPT_PATH@@' "$@" exec '@@NODE_PATH@@' -r '@@PNP_PATH@@' '@@SCRIPT_PATH@@' "$@"