Repository: nvm-sh/nvm
File: nvm.sh (Shell)

Code before:
        local NVM_USE_CMD
        NVM_USE_CMD="nvm use --delete-prefix"
        if [ -n "${PROVIDED_VERSION}" ]; then
          NVM_USE_CMD="${NVM_USE_CMD} ${VERSION}"
        fi
        if [ "${NVM_SILENT:-0}" -eq 1 ]; then
          NVM_USE_CMD="${NVM_USE_CMD} --silent"
        fi
        if ! nvm_die_on_prefix "${NVM_DELETE_PREFIX}" "${NVM_USE_CMD}" "${NVM_VERSION_DIR}"; then
          return 11
        fi
      fi
      if [ -n "${NVM_USE_OUTPUT-}" ] && [ "${NVM_SILENT:-0}" -ne 1 ]; then
        nvm_echo "${NVM_USE_OUTPUT}"
      fi
    ;;
    "run")
      local provided_version
      local has_checked_nvmrc
      has_checked_nvmrc=0
      local IS_VERSION_FROM_NVMRC
      IS_VERSION_FROM_NVMRC=0
      # run given version of node

      local NVM_SILENT
      local NVM_SILENT_ARG
      local NVM_LTS
      while [ $# -gt 0 ]; do
        case "$1" in
          --silent)
            NVM_SILENT=1
            NVM_SILENT_ARG='--silent'
            shift
          ;;
          --lts) NVM_LTS='*' ; shift ;;
          --lts=*) NVM_LTS="${1##--lts=}" ; shift ;;
          *)
            if [ -n "$1" ]; then
              break
            else
              shift
            fi
          ;; # stop processing arguments
        esac
      done

      if [ $# -lt 1 ] && [ -z "${NVM_LTS-}" ]; then
        NVM_SILENT="${NVM_SILENT:-0}" nvm_rc_version && has_checked_nvmrc=1
        if [ -n "${NVM_RC_VERSION-}" ]; then
          VERSION="$(nvm_version "${NVM_RC_VERSION-}")" ||:
        fi

Review comment (suggestion):
```suggestion
      local NVMRC_SAVE_TEXT
      NVMRC_SAVE_TEXT=''
```

Code after:
        NVM_SUCCESS_MSG="Uninstalled node ${VERSION}"
      fi

      local VERSION_PATH
      VERSION_PATH="$(nvm_version_path "${VERSION}")"
      if ! nvm_check_file_permissions "${VERSION_PATH}"; then
        nvm_err 'Cannot uninstall, incorrect permissions on installation folder.'
        nvm_err 'This is usually caused by running `npm install -g` as root. Run the following commands as root to fix the permissions and then try again.'
        nvm_err
        nvm_err "  chown -R $(whoami) \"$(nvm_sanitize_path "${VERSION_PATH}")\""
        nvm_err "  chmod -R u+w \"$(nvm_sanitize_path "${VERSION_PATH}")\""
        return 1
      fi

      # Delete all files related to target version.
      local CACHE_DIR
      CACHE_DIR="$(nvm_cache_dir)"
      command rm -rf \
        "${CACHE_DIR}/bin/${SLUG_BINARY}/files" \
        "${CACHE_DIR}/src/${SLUG_SOURCE}/files" \
        "${VERSION_PATH}" 2>/dev/null
      nvm_echo "${NVM_SUCCESS_MSG}"

      # rm any aliases that point to uninstalled version.
      for ALIAS in $(nvm_grep -l "${VERSION}" "$(nvm_alias_path)/*" 2>/dev/null); do
        nvm unalias "$(command basename "${ALIAS}")"
      done
    ;;
    "deactivate")
      local NVM_SILENT
      while [ $# -ne 0 ]; do
        case "${1}" in
          --silent) NVM_SILENT=1 ;;
          --) ;;
        esac
        shift
      done
      local NEWPATH
      NEWPATH="$(nvm_strip_path "${PATH}" "/bin")"
      if [ "_${PATH}" = "_${NEWPATH}" ]; then
        if [ "${NVM_SILENT:-0}" -ne 1 ]; then
          nvm_err "Could not find ${NVM_DIR}/*/bin in \${PATH}"
        fi
      else
        export PATH="${NEWPATH}"
        \hash -r
        if [ "${NVM_SILENT:-0}" -ne 1 ]; then
          nvm_echo "${NVM_DIR}/*/bin removed from \${PATH}"
        fi
      fi