Fix node path in bin wrappers
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec node '@@SCRIPT_PATH@@' "$@"
|
exec '@@NODE_PATH@@' '@@SCRIPT_PATH@@' "$@"
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec node -r '@@PNP_PATH@@' '@@SCRIPT_PATH@@' "$@"
|
exec '@@NODE_PATH@@' -r '@@PNP_PATH@@' '@@SCRIPT_PATH@@' "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user