mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	
							
								
								
									
										26
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -929,9 +929,16 @@ nvm_install_iojs_binary() { | |||||||
|       tmpdir="$NVM_DIR/bin/iojs-${t}" |       tmpdir="$NVM_DIR/bin/iojs-${t}" | ||||||
|       local tmptarball |       local tmptarball | ||||||
|       tmptarball="$tmpdir/iojs-${t}.tar.gz" |       tmptarball="$tmpdir/iojs-${t}.tar.gz" | ||||||
|       if ( |       local NVM_INSTALL_ERRORED | ||||||
|       command mkdir -p "$tmpdir" && \ |       command mkdir -p "$tmpdir" && \ | ||||||
|         nvm_download -L -C - --progress-bar $url -o "$tmptarball" && \ |         nvm_download -L -C - --progress-bar $url -o "$tmptarball" || \ | ||||||
|  |         NVM_INSTALL_ERRORED=true | ||||||
|  |       if grep '404 Not Found' "$tmptarball" >/dev/null; then | ||||||
|  |         NVM_INSTALL_ERRORED=true | ||||||
|  |         echo >&2 "HTTP 404 at URL $url"; | ||||||
|  |       fi | ||||||
|  |       if ( | ||||||
|  |         [ "$NVM_INSTALL_ERRORED" != true ] && \ | ||||||
|         echo "WARNING: checksums are currently disabled for io.js" >&2 && \ |         echo "WARNING: checksums are currently disabled for io.js" >&2 && \ | ||||||
|         # nvm_checksum "$tmptarball" $sum && \ |         # nvm_checksum "$tmptarball" $sum && \ | ||||||
|         command tar -xzf "$tmptarball" -C "$tmpdir" --strip-components 1 && \ |         command tar -xzf "$tmptarball" -C "$tmpdir" --strip-components 1 && \ | ||||||
| @@ -941,7 +948,7 @@ nvm_install_iojs_binary() { | |||||||
|       ); then |       ); then | ||||||
|         return 0 |         return 0 | ||||||
|       else |       else | ||||||
|         echo "Binary download failed, trying source." >&2 |         echo >&2 "Binary download failed, trying source." >&2 | ||||||
|         command rm -rf "$tmptarball" "$tmpdir" |         command rm -rf "$tmptarball" "$tmpdir" | ||||||
|         return 1 |         return 1 | ||||||
|       fi |       fi | ||||||
| @@ -983,9 +990,16 @@ nvm_install_node_binary() { | |||||||
|       tmpdir="$NVM_DIR/bin/node-${t}" |       tmpdir="$NVM_DIR/bin/node-${t}" | ||||||
|       local tmptarball |       local tmptarball | ||||||
|       tmptarball="$tmpdir/node-${t}.tar.gz" |       tmptarball="$tmpdir/node-${t}.tar.gz" | ||||||
|       if ( |       local NVM_INSTALL_ERRORED | ||||||
|       command mkdir -p "$tmpdir" && \ |       command mkdir -p "$tmpdir" && \ | ||||||
|         nvm_download -L -C - --progress-bar $url -o "$tmptarball" && \ |         nvm_download -L -C - --progress-bar $url -o "$tmptarball" || \ | ||||||
|  |         NVM_INSTALL_ERRORED=true | ||||||
|  |       if grep '404 Not Found' "$tmptarball" >/dev/null; then | ||||||
|  |         NVM_INSTALL_ERRORED=true | ||||||
|  |         echo >&2 "HTTP 404 at URL $url"; | ||||||
|  |       fi | ||||||
|  |       if ( | ||||||
|  |         [ "$NVM_INSTALL_ERRORED" != true ] && \ | ||||||
|         nvm_checksum "$tmptarball" $sum && \ |         nvm_checksum "$tmptarball" $sum && \ | ||||||
|         command tar -xzf "$tmptarball" -C "$tmpdir" --strip-components 1 && \ |         command tar -xzf "$tmptarball" -C "$tmpdir" --strip-components 1 && \ | ||||||
|         command rm -f "$tmptarball" && \ |         command rm -f "$tmptarball" && \ | ||||||
| @@ -994,7 +1008,7 @@ nvm_install_node_binary() { | |||||||
|       ); then |       ); then | ||||||
|         return 0 |         return 0 | ||||||
|       else |       else | ||||||
|         echo "Binary download failed, trying source." >&2 |         echo >&2 "Binary download failed, trying source." | ||||||
|         command rm -rf "$tmptarball" "$tmpdir" |         command rm -rf "$tmptarball" "$tmpdir" | ||||||
|         return 1 |         return 1 | ||||||
|       fi |       fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user