mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Fix whitespace
This commit is contained in:
		
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							| @@ -74,12 +74,12 @@ release: _ensure-tag _ensure-clean _ensure-current-version | |||||||
| 	@old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ | 	@old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ | ||||||
| 	new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ | 	new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ | ||||||
| 	if printf "$$new_ver" | grep -q '^[0-9]'; then \ | 	if printf "$$new_ver" | grep -q '^[0-9]'; then \ | ||||||
| 	  semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ | 		semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ | ||||||
| 	  semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ | 		semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ | ||||||
| 	else \ | 	else \ | ||||||
| 	  new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ | 		new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ | ||||||
| 	fi; \ | 	fi; \ | ||||||
| 	printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; };  \ | 	printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ | ||||||
| 	replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ | 	replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ | ||||||
| 	git commit -m "v$$new_ver" $(VERSIONED_FILES) && \ | 	git commit -m "v$$new_ver" $(VERSIONED_FILES) && \ | ||||||
| 	git tag -a "v$$new_ver" | 	git tag -a "v$$new_ver" | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								install.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								install.sh
									
									
									
									
									
								
							| @@ -68,12 +68,12 @@ nvm_download() { | |||||||
|   elif nvm_has "wget"; then |   elif nvm_has "wget"; then | ||||||
|     # Emulate curl with wget |     # Emulate curl with wget | ||||||
|     ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \ |     ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \ | ||||||
|                            -e 's/-L //' \ |                             -e 's/-L //' \ | ||||||
|                            -e 's/--compressed //' \ |                             -e 's/--compressed //' \ | ||||||
|                            -e 's/-I /--server-response /' \ |                             -e 's/-I /--server-response /' \ | ||||||
|                            -e 's/-s /-q /' \ |                             -e 's/-s /-q /' \ | ||||||
|                            -e 's/-o /-O /' \ |                             -e 's/-o /-O /' \ | ||||||
|                            -e 's/-C - /-c /') |                             -e 's/-C - /-c /') | ||||||
|     # shellcheck disable=SC2086 |     # shellcheck disable=SC2086 | ||||||
|     eval wget $ARGS |     eval wget $ARGS | ||||||
|   fi |   fi | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -108,13 +108,13 @@ nvm_download() { | |||||||
|   elif nvm_has "wget"; then |   elif nvm_has "wget"; then | ||||||
|     # Emulate curl with wget |     # Emulate curl with wget | ||||||
|     ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \ |     ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \ | ||||||
|                            -e 's/--compressed //' \ |                             -e 's/--compressed //' \ | ||||||
|                            -e 's/--fail //' \ |                             -e 's/--fail //' \ | ||||||
|                            -e 's/-L //' \ |                             -e 's/-L //' \ | ||||||
|                            -e 's/-I /--server-response /' \ |                             -e 's/-I /--server-response /' \ | ||||||
|                            -e 's/-s /-q /' \ |                             -e 's/-s /-q /' \ | ||||||
|                            -e 's/-o /-O /' \ |                             -e 's/-o /-O /' \ | ||||||
|                            -e 's/-C - /-c /') |                             -e 's/-C - /-c /') | ||||||
|     # shellcheck disable=SC2086 |     # shellcheck disable=SC2086 | ||||||
|     eval wget $ARGS |     eval wget $ARGS | ||||||
|   fi |   fi | ||||||
| @@ -611,8 +611,8 @@ nvm_change_path() { | |||||||
|     nvm_echo "${3-}${2-}" |     nvm_echo "${3-}${2-}" | ||||||
|   # if the initial path doesn’t contain an nvm path, prepend the supplementary |   # if the initial path doesn’t contain an nvm path, prepend the supplementary | ||||||
|   # path |   # path | ||||||
|   elif ! echo "${1-}" | nvm_grep -q "${NVM_DIR}/[^/]*${2-}" && \ |   elif ! echo "${1-}" | nvm_grep -q "${NVM_DIR}/[^/]*${2-}" \ | ||||||
|        ! echo "${1-}" | nvm_grep -q "${NVM_DIR}/versions/[^/]*/[^/]*${2-}"; then |     && ! echo "${1-}" | nvm_grep -q "${NVM_DIR}/versions/[^/]*/[^/]*${2-}"; then | ||||||
|     nvm_echo "${3-}${2-}:${1-}" |     nvm_echo "${3-}${2-}:${1-}" | ||||||
|   # use sed to replace the existing nvm path with the supplementary path. This |   # use sed to replace the existing nvm path with the supplementary path. This | ||||||
|   # preserves the order of the path. |   # preserves the order of the path. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user