Skip to content

Commit ffaf577

Browse files
Dena BurdDena Burd
authored andcommitted
Make Alias when installing a new version
1 parent 13e2a7f commit ffaf577

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nvm.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1802,6 +1802,10 @@ nvm_install_binary() {
18021802
command mv "${TMPDIR}/"* "${VERSION_PATH}" && \
18031803
command rm -rf "${TMPDIR}"
18041804
); then
1805+
1806+
if [ -n "${ALIAS}" ]; then
1807+
nvm alias "${ALIAS}" "${provided_version}"
1808+
fi
18051809
return 0
18061810
fi
18071811

@@ -2618,7 +2622,7 @@ nvm() {
26182622
NVM_UPGRADE_NPM=1
26192623
shift
26202624
;;
2621-
--default)
2625+
--default)
26222626
if [ -n "${ALIAS-}" ]; then
26232627
nvm_err '--default and --alias are mutually exclusive, and may not be provided more than once'
26242628
return 6

0 commit comments

Comments
 (0)