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

Code before:
      else

        if [ "_${NVM_OS}" = "_freebsd" ]; then
          # node.js and io.js do not have a FreeBSD binary
          nobinary=1
          nvm_err "Currently, there is no binary for FreeBSD"
        elif [ "_${NVM_OS}" = "_sunos" ]; then
          # Not all node/io.js versions have a Solaris binary
          if ! nvm_has_solaris_binary "${VERSION}"; then
            nobinary=1
            nvm_err "Currently, there is no binary of version ${VERSION} for SunOS"
          fi
        fi

        # skip binary install if "nobinary" option specified.
        if [ $nobinary -ne 1 ] && nvm_binary_available "${VERSION}"; then
          NVM_NO_PROGRESS="${NVM_NO_PROGRESS:-${noprogress}}" nvm_install_binary "${FLAVOR}" std "${VERSION}"
          EXIT_CODE=$?
        fi
        if [ $EXIT_CODE -ne 0 ]; then
          if [ -z "${NVM_MAKE_JOBS-}" ]; then
            nvm_get_make_jobs
          fi

          if [ "_${NVM_OS}" = "_win" ]; then
            nvm_err "Unable to install from source for Windows"
            EXIT_CODE=87
          else
            NVM_NO_PROGRESS="${NVM_NO_PROGRESS:-${noprogress}}" nvm_install_source "${FLAVOR}" std "${VERSION}" "${NVM_MAKE_JOBS}" "${ADDITIONAL_PARAMETERS}"
            EXIT_CODE=$?
          fi
        fi

      fi

      if [ $EXIT_CODE -eq 0 ] && nvm_use_if_needed "${VERSION}" && nvm_install_npm_if_needed "${VERSION}"; then
        if [ -n "${LTS-}" ]; then
          nvm_ensure_default_set "lts/${LTS}"
        else
          nvm_ensure_default_set "${provided_version}"
        fi
        if [ "${NVM_UPGRADE_NPM}" = 1 ]; then
          nvm install-latest-npm
          EXIT_CODE=$?
        fi
        if [ -z "${SKIP_DEFAULT_PACKAGES-}" ] && [ -n "${DEFAULT_PACKAGES-}" ]; then
          nvm_install_default_packages "${DEFAULT_PACKAGES}"
        fi
        if [ -n "${REINSTALL_PACKAGES_FROM-}" ] && [ "_${REINSTALL_PACKAGES_FROM}" != "_N/A" ]; then
          nvm reinstall-packages "${REINSTALL_PACKAGES_FROM}"
          EXIT_CODE=$?

Review comment (suggestion):
```suggestion
            nvm_err 'Installing from source on non-WSL Windows is not supported'
```

Code after:
          # Not all node/io.js versions have a Solaris binary
          if ! nvm_has_solaris_binary "${VERSION}"; then
            nobinary=1
            nvm_err "Currently, there is no binary of version ${VERSION} for SunOS"
          fi
        fi

        # skip binary install if "nobinary" option specified.
        if [ $nobinary -ne 1 ] && nvm_binary_available "${VERSION}"; then
          NVM_NO_PROGRESS="${NVM_NO_PROGRESS:-${noprogress}}" nvm_install_binary "${FLAVOR}" std "${VERSION}" "${nosource}"
          EXIT_CODE=$?
        fi
        if [ $EXIT_CODE -ne 0 ]; then
          if [ -z "${NVM_MAKE_JOBS-}" ]; then
            nvm_get_make_jobs
          fi

          if [ "_${NVM_OS}" = "_win" ]; then
            nvm_err 'Installing from source on non-WSL Windows is not supported'
            EXIT_CODE=87
          else
            NVM_NO_PROGRESS="${NVM_NO_PROGRESS:-${noprogress}}" nvm_install_source "${FLAVOR}" std "${VERSION}" "${NVM_MAKE_JOBS}" "${ADDITIONAL_PARAMETERS}"
            EXIT_CODE=$?
          fi
        fi

      fi

      if [ $EXIT_CODE -eq 0 ] && nvm_use_if_needed "${VERSION}" && nvm_install_npm_if_needed "${VERSION}"; then
        if [ -n "${LTS-}" ]; then
          nvm_ensure_default_set "lts/${LTS}"
        else
          nvm_ensure_default_set "${provided_version}"
        fi
        if [ "${NVM_UPGRADE_NPM}" = 1 ]; then
          nvm install-latest-npm
          EXIT_CODE=$?
        fi
        if [ -z "${SKIP_DEFAULT_PACKAGES-}" ] && [ -n "${DEFAULT_PACKAGES-}" ]; then
          nvm_install_default_packages "${DEFAULT_PACKAGES}"
        fi
        if [ -n "${REINSTALL_PACKAGES_FROM-}" ] && [ "_${REINSTALL_PACKAGES_FROM}" != "_N/A" ]; then
          nvm reinstall-packages "${REINSTALL_PACKAGES_FROM}"
          EXIT_CODE=$?
        fi
      else
        EXIT_CODE=$?
      fi
      return $EXIT_CODE
    ;;
    "uninstall")