Skip to content

Instantly share code, notes, and snippets.

@nickleefly
Forked from tamzinblake/npx-osx.md
Created December 10, 2017 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickleefly/9e35a60aba44f9669c1128a258a16caf to your computer and use it in GitHub Desktop.
Save nickleefly/9e35a60aba44f9669c1128a258a16caf to your computer and use it in GitHub Desktop.
How to get npx shell auto fallback working on OSX bash

OSX ships with bash 3 by default, but you need bash 4 to use npx shell auto fallback. Using homebrew:

(instructions borrowed from https://github.com/Homebrew/homebrew-command-not-found)

brew update && brew install bash
# Add the new shell to the list of allowed shells
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
# Change to the new shell
chsh -s /usr/local/bin/bash

Then you can just follow the instructions in the npx README and it should work as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment