mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-02-05 09:22:50 +08:00
[Fix] nvm_has_colors: also check if stdout is a terminal
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user