You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
545 B
24 lines
545 B
#!/bin/sh
|
|
source ../common.sh
|
|
|
|
# Version to revert nvm to
|
|
revert_version=v0.32.0
|
|
|
|
# Load zsh-nvm
|
|
load_zsh_nvm
|
|
|
|
# Save latest version
|
|
latest_version=$(nvm --version)
|
|
|
|
# Roll back to an old version
|
|
echo "$revert_version" > "$ZSH_NVM_DIR/previous_version"
|
|
nvm revert
|
|
|
|
# Check rollback worked
|
|
[[ "v$(nvm --version)" == "$revert_version" ]] || die "Couldn't rollback nvm version"
|
|
|
|
# Attempt to upgrade
|
|
nvm upgrade
|
|
|
|
# Check upgrade worked
|
|
[[ "$(nvm --version)" == "$latest_version" ]] || die "Couldn't upgrade nvm to latest version ($latest_version)"
|
|
|