Files
nvm/test/fast/Running 'nvm uninstall' with an uninstalled version shows the requested version
Peter Dave Hello 5533699ec5 Improve uninstall error message for missing versions
Include the requested version in the uninstall error output when

the target is not installed.

Add a fast test to lock the behavior.

Close #3767
2026-01-30 00:04:01 +08:00

14 lines
238 B
Bash
Executable File

#!/bin/sh
set -ex
\. ../../nvm.sh
\. ../common.sh
set +ex # needed for stderr
RETURN_MESSAGE="$(nvm uninstall 22 2>&1 || echo)"
set -ex
EXPECTED_MESSAGE="Version '22' is not installed."
[ "${RETURN_MESSAGE}" = "${EXPECTED_MESSAGE}" ]