Skip to content

fix: unset variables before shtests #3283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/shtest
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ PATH=$JQBASEDIR:$PATH $JQBASEDIR/tests/jq-f-test.sh > /dev/null
SHELL=/bin/sh
export SHELL

unset JQ_COLORS
unset NO_COLOR

if [ -f "$JQBASEDIR/.libs/libinject_errors.so" ]; then
# Do some simple error injection tests to check that we're handling
# I/O errors correctly.
Expand Down Expand Up @@ -413,7 +416,6 @@ if [ "$($VALGRIND $Q $JQ -n '{"a":"xyz"} | halt_error(1)' 2>&1)" != '{"a":"xyz"}
fi

# Check $JQ_COLORS
unset JQ_COLORS

## Default colors, null input
$JQ -Ccn . > $d/color
Expand Down Expand Up @@ -552,7 +554,6 @@ test_no_color=true
$msys && test_no_color=false
$mingw && test_no_color=false
if $test_no_color && command -v script >/dev/null 2>&1; then
unset NO_COLOR
if script -qc echo /dev/null >/dev/null 2>&1; then
faketty() { script -qec "$*" /dev/null; }
else # macOS
Expand Down
Loading