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 <noreply@anthropic.com>
This commit is contained in:
@@ -49,8 +49,12 @@ send() {
|
|||||||
start_session() {
|
start_session() {
|
||||||
tmux kill-session -t "$TMUX_SESSION" 2>/dev/null || true
|
tmux kill-session -t "$TMUX_SESSION" 2>/dev/null || true
|
||||||
sleep 0.5
|
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" \
|
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
|
# Keep the pane alive after the script exits so capture_output can read it
|
||||||
tmux set-option -t "$TMUX_SESSION" remain-on-exit on
|
tmux set-option -t "$TMUX_SESSION" remain-on-exit on
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
|||||||
Reference in New Issue
Block a user