Skip to content

Instantly share code, notes, and snippets.

@tamzinblake
Created June 9, 2017 20:46
Show Gist options
  • Save tamzinblake/fb50523e76f2b802bd23ac0680d1f711 to your computer and use it in GitHub Desktop.
Save tamzinblake/fb50523e76f2b802bd23ac0680d1f711 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