Skip to content

Commit

Permalink
fix: Use node in and fallback to PATH if not found (npm#4778)
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Tizzoni <[email protected]>
  • Loading branch information
elibus and Marco Tizzoni authored Apr 20, 2022
1 parent 252a02c commit a677f49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/npx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ case `uname` in
esac

NODE_EXE="$basedir/node.exe"
if ! [ -x "$NODE_EXE" ]; then
NODE_EXE="$basedir/node"
fi
if ! [ -x "$NODE_EXE" ]; then
NODE_EXE=node
fi
Expand Down

0 comments on commit a677f49

Please sign in to comment.