From fb69304a9b8b13672140a15da082e0449610e6d7 Mon Sep 17 00:00:00 2001 From: Flo Date: Tue, 31 Mar 2026 18:37:15 +0200 Subject: [PATCH] fix: container interactive tests fail on empty GIT_CONFIG_GLOBAL Only export GIT_CONFIG_GLOBAL in tmux sessions when already set. An empty value tells git "no global config" vs unset (uses ~/.gitconfig). Also fix stat format detection in SSH permissions test. Co-Authored-By: Claude --- test/interactive/helpers.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/interactive/helpers.sh b/test/interactive/helpers.sh index e39a408..b0e791b 100755 --- a/test/interactive/helpers.sh +++ b/test/interactive/helpers.sh @@ -49,8 +49,12 @@ send() { start_session() { tmux kill-session -t "$TMUX_SESSION" 2>/dev/null || true sleep 0.5 + local env_setup="export HOME='${HOME}';" + if [ -n "${GIT_CONFIG_GLOBAL:-}" ]; then + env_setup="${env_setup} export GIT_CONFIG_GLOBAL='${GIT_CONFIG_GLOBAL}';" + fi tmux new-session -d -s "$TMUX_SESSION" \ - "export HOME='${HOME}'; export GIT_CONFIG_GLOBAL='${GIT_CONFIG_GLOBAL:-}'; bash '${SCRIPT_PATH}'" + "${env_setup} bash '${SCRIPT_PATH}'" # Keep the pane alive after the script exits so capture_output can read it tmux set-option -t "$TMUX_SESSION" remain-on-exit on sleep 0.5