Skip to content
This repository
Browse code

Added check for unsetopt

unsetopt doesn't exist on OSX by default which causes `. nvm.sh` to
fail at that line.
  • Loading branch information...
commit 3bb2634d2f871e1b049cd4994fffe236ed7df78f 1 parent e475d7e
noobster authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  nvm.sh
4  nvm.sh
@@ -12,7 +12,9 @@ fi
12 12
 
13 13
 # Make zsh glob matching behave same as bash
14 14
 # This fixes the "zsh: no matches found" errors
15  
-unsetopt nomatch 2>/dev/null
  15
+if [[ `which unsetopt` ]]; then
  16
+    unsetopt nomatch 2>/dev/null
  17
+fi
16 18
 
17 19
 # Expand a version using the version cache
18 20
 nvm_version()

0 notes on commit 3bb2634

Please sign in to comment.
Something went wrong with that request. Please try again.