Say I have this defined for PATH

export PATH="./node_modules/.bin:${PATH}"

does that mean that any process that uses PATH, will have a reference to node_modules/.bin from the current working dir?

  • That depends on where the PATH is being set and what shell the process is using. – Nasir Riley Oct 1 '18 at 23:01
  • If the PATH is being set previously, in a parent shell. – Alexander Mills Oct 1 '18 at 23:31

If the export PATH … … call was executed by a parent shell of the shell where the present command is called and that PATH has not been modified by some intermediary shell, then:


All child commands will search for executables (first) inside ./node_modules/.bin of any pwd. A pretty serious and clear security hole, Don't do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.