mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	install.sh: use a more generic SOURCE_STR
SOURCE_STR currently includes the value of $HOME (at install time). Change SOURCE_STR to include a literal "$HOME" (to be expanded at profile runtime) so that sourcing nvm will work if the user changes their username, shares their profile, et cetera. Also use the more portable single-square-bracket test.
This commit is contained in:
		| @@ -30,7 +30,7 @@ else | ||||
|   fi | ||||
| fi | ||||
|  | ||||
| SOURCE_STR="[[ -s "$NVM_DIR/nvm.sh" ]] && . "$NVM_DIR/nvm.sh"  # This loads NVM" | ||||
| SOURCE_STR="[ -s \$HOME/.nvm/nvm.sh ] && . \$HOME/.nvm/nvm.sh  # This loads NVM" | ||||
|  | ||||
| if [ -z "$PROFILE" ] || [ ! -f "$PROFILE" ] ; then | ||||
|   if [ -z $PROFILE ]; then | ||||
|   | ||||
		Reference in New Issue
	
	Block a user