mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:00:06 +08:00 
			
		
		
		
	[Fix] Add missing "command" prefixes for few commands
This commit is contained in:
		
				
					committed by
					
						 Jordan Harband
						Jordan Harband
					
				
			
			
				
	
			
			
			
						parent
						
							bb803492d8
						
					
				
				
					commit
					f3076d14c9
				
			| @@ -7,7 +7,7 @@ nvm_has() { | ||||
| } | ||||
|  | ||||
| nvm_install_dir() { | ||||
|   printf %s "${NVM_DIR:-"$HOME/.nvm"}" | ||||
|   command printf %s "${NVM_DIR:-"$HOME/.nvm"}" | ||||
| } | ||||
|  | ||||
| nvm_latest_version() { | ||||
| @@ -188,7 +188,7 @@ install_nvm_as_script() { | ||||
|     echo >&2 "Failed to download '$NVM_BASH_COMPLETION_SOURCE'" | ||||
|     return 2 | ||||
|   } & | ||||
|   for job in $(jobs -p | sort) | ||||
|   for job in $(jobs -p | command sort) | ||||
|   do | ||||
|     wait "$job" || return $? | ||||
|   done | ||||
| @@ -268,7 +268,7 @@ nvm_check_global_modules() { | ||||
|   MODULE_COUNT="$( | ||||
|     command printf %s\\n "$NPM_GLOBAL_MODULES" | | ||||
|     command sed -ne '1!p' |                     # Remove the first line | ||||
|     wc -l | tr -d ' '                           # Count entries | ||||
|     wc -l | command tr -d ' '                   # Count entries | ||||
|   )" | ||||
|  | ||||
|   if [ "${MODULE_COUNT}" != '0' ]; then | ||||
| @@ -327,7 +327,7 @@ nvm_do_install() { | ||||
|   local NVM_PROFILE | ||||
|   NVM_PROFILE="$(nvm_detect_profile)" | ||||
|   local PROFILE_INSTALL_DIR | ||||
|   PROFILE_INSTALL_DIR="$(nvm_install_dir | sed "s:^$HOME:\$HOME:")" | ||||
|   PROFILE_INSTALL_DIR="$(nvm_install_dir | command sed "s:^$HOME:\$HOME:")" | ||||
|  | ||||
|   SOURCE_STR="\\nexport NVM_DIR=\"${PROFILE_INSTALL_DIR}\"\\n[ -s \"\$NVM_DIR/nvm.sh\" ] && \\. \"\$NVM_DIR/nvm.sh\"  # This loads nvm\\n" | ||||
|   # shellcheck disable=SC2016 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user