You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			13 lines
		
	
	
		
			350 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			13 lines
		
	
	
		
			350 B
		
	
	
	
		
			Bash
		
	
#!/bin/sh
 | 
						|
 | 
						|
die () { echo $@ ; exit 1; }
 | 
						|
 | 
						|
. ../../../nvm.sh
 | 
						|
 | 
						|
nvm_has cat && type cat > /dev/null || die 'nvm_has locates "cat" properly'
 | 
						|
 | 
						|
[ "~$(nvm_has foobarbaz 2>&1)" = "~" ] || die "nvm_has does not suppress error output"
 | 
						|
 | 
						|
! nvm_has foobarbaz && ! type foobarbaz >/dev/null 2>&1 || die "nvm_has does not return a nonzero exit code when not found"
 | 
						|
 |