mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Fix the 'nvm deactivate' test
`nvm deactivate` does not really remove the nvm command, it just remove the entries from $PATH and $MANPATH previously adde with `nvm use`.
This commit is contained in:
		| @@ -1,6 +1,14 @@ | |||||||
| #!/bin/sh | #!/bin/sh | ||||||
|  |  | ||||||
|  | mkdir -p ../../v0.2.3 | ||||||
|  |  | ||||||
|  | die () { echo $@ ; exit 1; } | ||||||
|  |  | ||||||
|  | [[ $PATH != *v0.2.3/*/bin* ]] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2 | ||||||
|  |  | ||||||
| . ../../nvm.sh | . ../../nvm.sh | ||||||
| nvm && | nvm use v0.2.3 && | ||||||
|  | [[ $PATH == *v0.2.3/*/bin* ]] || die "Failed to activate v0.2.3" | ||||||
|  |  | ||||||
| nvm deactivate && | nvm deactivate && | ||||||
| ! nvm | [[ $PATH != *v0.2.3/*/bin* ]] || die "Failed to deactivate v0.2.3" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user