]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Use bash for running script command (#1482)
authorAnders Björklund <anders.f.bjorklund@gmail.com>
Tue, 9 Jul 2024 17:45:00 +0000 (19:45 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 22 Jul 2024 13:57:36 +0000 (15:57 +0200)
The script program will try to run the --command parameter with the
login shell, rather than the currently running test shell (bash).

(cherry picked from commit 18c44ca1ea254e9cbceb71171c4e3a4524df6891)

test/suites/color_diagnostics.bash

index 53a9c2bb58c34f18b14d6daad3e119e25a1e77bd..77a45800cd7ad41adc496b2b13cda203d58aaf2c 100644 (file)
@@ -79,6 +79,8 @@ color_diagnostics_generate_permutations() {
 }
 
 color_diagnostics_run_on_pty() {
+    # command uses bash syntax, make sure that script uses the bash shell to run
+    SHELL=$BASH \
     script --return --quiet --command "unset GCC_COLORS; CCACHE_DIR='$CCACHE_DIR' ${2:?}" /dev/null </dev/null >"${1:?}"
 
     # script returns early on some platforms (leaving a child process living for