[Fix] nvm_has_colors: also check if stdout is a terminal

This commit is contained in:
Jordan Harband
2026-01-26 23:31:00 -08:00
parent d2f93c1c8e
commit 35212c1346
17 changed files with 94 additions and 39 deletions

View File

@@ -33,7 +33,7 @@ nvm_version() {
}
OUTPUT="$(nvm_print_default_alias blah | strip_colors)"
EXPECTED_OUTPUT='blah -> "local-blah" (-> v"local-blah") (default)'
EXPECTED_OUTPUT='blah -> "local-blah" (-> v"local-blah" *) (default)'
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_print_default_alias blah' should strip alias dir and print nvm_print_implicit_alias output; got '$OUTPUT', expected '$EXPECTED_OUTPUT'"
cleanup