Permalink
Browse files

Added check for unsetopt

unsetopt doesn't exist on OSX by default which causes `. nvm.sh` to
fail at that line.
  • Loading branch information...
1 parent e475d7e commit 3bb2634d2f871e1b049cd4994fffe236ed7df78f @noobster noobster committed Aug 8, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 nvm.sh
View
4 nvm.sh
@@ -12,7 +12,9 @@ fi
# Make zsh glob matching behave same as bash
# This fixes the "zsh: no matches found" errors
-unsetopt nomatch 2>/dev/null
+if [[ `which unsetopt` ]]; then
+ unsetopt nomatch 2>/dev/null
+fi
# Expand a version using the version cache
nvm_version()

0 comments on commit 3bb2634

Please sign in to comment.