Skip to content

Instantly share code, notes, and snippets.

@darkobits
Created August 14, 2022 07:51
Show Gist options
  • Save darkobits/ffaee26c0f322ce9e1a8b9b65697701d to your computer and use it in GitHub Desktop.
Save darkobits/ffaee26c0f322ce9e1a8b9b65697701d to your computer and use it in GitHub Desktop.
Add $(npm bin) to $PATH
# Ensures that a locally-installed version of an NPM package will always be
# preferred over a globally installed version, and that we can run that
# package's executable like any other binary. To ensure a rogue package cannot
# install an executable that could shadow another binary (ie: 'ssh') make sure
# that $(npm bin) is appended rather than prepended to your existing $PATH.
export PATH="$PATH:$(npm bin)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment