fix: find and source ~/.jq file on windows (fixes #3104) (#3114)

This commit is contained in:
Kirk McKelvey authored and GitHub committed 2024-08-24 08:44:08 +09:00
1 parent da2a0b970c
commit 6322b99252
4 files changed
+20 -6

No files matched your search

+11
View File
@@ -359,6 +359,17 @@ if [ "$(HOME="$mods/home1" $VALGRIND $Q $JQ -nr fg)" != foobar ]; then
exit 1
fi
if $msys || $mingw; then
HOME_BAK=$HOME
unset HOME
if [ "$(USERPROFILE="$mods/home1" $VALGRIND $Q $JQ -nr foo)" != baz ]; then
echo "Bug #3104 regressed (sourcing %USERPROFILE%/.jq on Windows)" 1>&2
exit 1
fi
export HOME=$HOME_BAK
unset HOME_BAK
fi
if [ $(HOME="$mods/home1" $VALGRIND $Q $JQ --debug-dump-disasm -n fg | grep '^[a-z]' | wc -l) -ne 3 ]; then
echo "Binding too many defs into program" 1>&2
exit 1