mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Update nvm.sh
Add prompt when there is no binary for node version greater than v1.0.0 Currently, on FreeBSD, if we try `nvm install 4.2`, we will only get: > Installing node v1.0 and greater from source is not currently supported In fact I had no idea what's wrong because I didn't use `-s` parameter for it, and then I found that there are two reasons: 1. There was no pre-built nodejs binary from official for FreeBSD, which means we need to build from source. 2. nvm doesn't support build for v1.0 and greater version from source yet. So I think there should be a prompt message to tell the user about the reason why nvm will go to build from source, no matter it will succeed or fail.
This commit is contained in:
		
				
					committed by
					
						 Peter Dave Hello
						Peter Dave Hello
					
				
			
			
				
	
			
			
			
						parent
						
							803be3a4eb
						
					
				
				
					commit
					2a174d03d8
				
			
							
								
								
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -1616,10 +1616,12 @@ nvm() { | |||||||
|       if [ "_$NVM_OS" = "_freebsd" ]; then |       if [ "_$NVM_OS" = "_freebsd" ]; then | ||||||
|         # node.js and io.js do not have a FreeBSD binary |         # node.js and io.js do not have a FreeBSD binary | ||||||
|         nobinary=1 |         nobinary=1 | ||||||
|  |         echo "Currently, there is no binary for $NVM_OS" >&2 | ||||||
|       elif [ "_$NVM_OS" = "_sunos" ]; then |       elif [ "_$NVM_OS" = "_sunos" ]; then | ||||||
|         # Not all node/io.js versions have a Solaris binary |         # Not all node/io.js versions have a Solaris binary | ||||||
|           if ! nvm_has_solaris_binary "$VERSION"; then |           if ! nvm_has_solaris_binary "$VERSION"; then | ||||||
|             nobinary=1 |             nobinary=1 | ||||||
|  |             echo "Currently, there is no binary of version $VERSION for $NVM_OS" >&2 | ||||||
|         fi |         fi | ||||||
|       fi |       fi | ||||||
|       local NVM_INSTALL_SUCCESS |       local NVM_INSTALL_SUCCESS | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user