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

Code before:

      # Change current version
      PATH="$(nvm_change_path "${PATH}" "/bin" "${NVM_VERSION_DIR}")"
      if nvm_has manpath; then
        if [ -z "${MANPATH-}" ]; then
          local MANPATH
          MANPATH=$(manpath)
        fi
        # Change current version
        MANPATH="$(nvm_change_path "${MANPATH}" "/share/man" "${NVM_VERSION_DIR}")"
        export MANPATH
      fi
      export PATH
      hash -r
      export NVM_BIN="${NVM_VERSION_DIR}/bin"
      export NVM_INC="${NVM_VERSION_DIR}/include/node"
      if [ "${NVM_SYMLINK_CURRENT-}" = true ]; then
        command rm -f "${NVM_DIR}/current" && ln -s "${NVM_VERSION_DIR}" "${NVM_DIR}/current"
      fi
      local NVM_USE_OUTPUT
      NVM_USE_OUTPUT=''
      if [ "${NVM_SILENT:-0}" -ne 1 ]; then
        if nvm_is_iojs_version "${VERSION}"; then
          NVM_USE_OUTPUT="Now using io.js $(nvm_strip_iojs_prefix "${VERSION}")$(nvm_print_npm_version)"
        else
          NVM_USE_OUTPUT="Now using node ${VERSION}$(nvm_print_npm_version)$NVMRC_SAVE_TEXT"
        fi
      fi
      if [ "_${VERSION}" != "_system" ]; then
        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

Review comment (suggestion):
```suggestion
          NVM_USE_OUTPUT="Now using node ${VERSION}$(nvm_print_npm_version)${NVMRC_SAVE_TEXT}"
```

Code after:
          nvm_err "nvm: Cannot uninstall currently-active io.js version, ${VERSION} (inferred from ${PATTERN})."
        else
          nvm_err "nvm: Cannot uninstall currently-active node version, ${VERSION} (inferred from ${PATTERN})."
        fi
        return 1
      fi

      if ! nvm_is_version_installed "${VERSION}"; then
        nvm_err "${VERSION} version is not installed..."
        return
      fi

      local SLUG_BINARY
      local SLUG_SOURCE
      if nvm_is_iojs_version "${VERSION}"; then
        SLUG_BINARY="$(nvm_get_download_slug iojs binary std "${VERSION}")"
        SLUG_SOURCE="$(nvm_get_download_slug iojs source std "${VERSION}")"
      else
        SLUG_BINARY="$(nvm_get_download_slug node binary std "${VERSION}")"
        SLUG_SOURCE="$(nvm_get_download_slug node source std "${VERSION}")"
      fi

      local NVM_SUCCESS_MSG
      if nvm_is_iojs_version "${VERSION}"; then
        NVM_SUCCESS_MSG="Uninstalled io.js $(nvm_strip_iojs_prefix "${VERSION}")"
      else
        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