File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ export default async function shadowBin(
8080 stdio = [ 'pipe' , 'pipe' , 'pipe' , 'ipc' ]
8181 }
8282
83+ const realBinPath = await installLinks ( constants . shadowBinPath , binName )
84+
8385 const spawnPromise = spawn (
8486 constants . execPath ,
8587 [
@@ -92,7 +94,7 @@ export default async function shadowBin(
9294 : [ ] ) ,
9395 '--require' ,
9496 constants . shadowNpmInjectPath ,
95- await installLinks ( constants . shadowBinPath , binName ) ,
97+ realBinPath ,
9698 ...( useNodeOptions
9799 ? [
98100 `--node-options='${ nodeOptionsArg ? nodeOptionsArg . slice ( 15 ) : '' } ${ cmdFlagsToString ( permArgs ) } '` ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111} from '../../utils/npm-paths.mts'
1212
1313export async function installLinks (
14- realBinPath : string ,
14+ shadowBinPath : string ,
1515 binName : 'npm' | 'npx' ,
1616) : Promise < string > {
1717 const isNpx = binName === 'npx'
@@ -28,11 +28,11 @@ export async function installLinks(
2828 if ( WIN32 ) {
2929 await cmdShim (
3030 path . join ( constants . distPath , `${ binName } -cli.js` ) ,
31- path . join ( realBinPath , binName ) ,
31+ path . join ( shadowBinPath , binName ) ,
3232 )
3333 }
3434 const { env } = process
35- env [ 'PATH' ] = `${ realBinPath } ${ path . delimiter } ${ env [ 'PATH' ] } `
35+ env [ 'PATH' ] = `${ shadowBinPath } ${ path . delimiter } ${ env [ 'PATH' ] } `
3636 }
3737 return binPath
3838}
You can’t perform that action at this time.
0 commit comments