File tree Expand file tree Collapse file tree
packages/node-patches/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -563,10 +563,9 @@ set Path=${nodeDir};%Path%
563563 }
564564 else {
565565 fs$1 . writeFileSync ( path . join ( nodeDir , 'node' ) , `#!/bin/bash
566- export NP_PATCHED_NODEJS=${ nodeDir }
567- export PATH=${ nodeDir } :$PATH
568- hasScript=\`echo "$@" | grep ${ path . basename ( requireScriptName ) } \`
569- if [ "$hasScript"=="" ]; then
566+ export NP_PATCHED_NODEJS="${ nodeDir } "
567+ export PATH="${ nodeDir } ":\$PATH
568+ if [[ ! "\${@}" =~ "${ file } " ]]; then
570569 exec ${ process . execPath } --require "${ requireScriptName } " "$@"
571570else
572571 exec ${ process . execPath } "$@"
Original file line number Diff line number Diff line change @@ -28,10 +28,9 @@ set Path=${nodeDir};%Path%
2828 } else {
2929 fs . writeFileSync (
3030 path . join ( nodeDir , 'node' ) , `#!/bin/bash
31- export NP_PATCHED_NODEJS=${ nodeDir }
32- export PATH=${ nodeDir } :$PATH
33- hasScript=\`echo "$@" | grep ${ path . basename ( requireScriptName ) } \`
34- if [ "$hasScript"=="" ]; then
31+ export NP_PATCHED_NODEJS="${ nodeDir } "
32+ export PATH="${ nodeDir } ":\$PATH
33+ if [[ ! "\${@}" =~ "${ file } " ]]; then
3534 exec ${ process . execPath } --require "${ requireScriptName } " "$@"
3635else
3736 exec ${ process . execPath } "$@"
You can’t perform that action at this time.
0 commit comments