Skip to content

Instantly share code, notes, and snippets.

@chazcheadle
Created September 8, 2016 20:29
Show Gist options
  • Select an option

  • Save chazcheadle/d41b1185ddafd2e0b031b4263eb062d6 to your computer and use it in GitHub Desktop.

Select an option

Save chazcheadle/d41b1185ddafd2e0b031b4263eb062d6 to your computer and use it in GitHub Desktop.
nvm_test.sh
#!/bin/bash
if command -v nvm 1&>2 >/dev/null; then
if [ -f "$HOME/.nvmrc" ]; then
nvm use
echo -n "Using Node: `nvm current`"
else
echo -n "nvm installed but .nvmrc not found."
fi
else
echo -n "nvm not installed"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment