[Tests] ensure things that care about colors run in a terminal

This commit is contained in:
Jordan Harband
2024-07-28 21:00:48 -07:00
parent ff1257e8e3
commit d2f31a21f3
9 changed files with 62 additions and 55 deletions

View File

@@ -245,3 +245,8 @@ _json_parse() {
nvm_json_extract() {
nvm_json_tokenize | _json_parse | grep -e "${1}" | awk '{print $2 $3}'
}
# ensures that commands are run as if in a terminal
run_in_terminal() {
script -q -a /dev/null sh -c "\. ../nvm.sh ; $*"
}