feat(ssh): pass client $TERM variable to container's tmux session

This commit is contained in:
yeti 2025-05-14 07:37:20 +01:00
parent 8aefadda19
commit e6ca515744

View File

@ -157,7 +157,7 @@ rw)
fi
log "$PERSON is working on $WORKSPACE's workspace"
if ! podman exec -it -e TERM=tmux-256color --user "$DEV_USER" "$WORKSPACE" tmux attach -t "$TMUX_SESSION"; then
if ! podman exec -it -e TERM="$TERM" --user "$DEV_USER" "$WORKSPACE" tmux attach -t "$TMUX_SESSION"; then
log "❌ Could not attach to tmux session. Please contact admin or try again later."
exit 1
fi
@ -169,7 +169,7 @@ rw)
ro)
if (podman container exists "$WORKSPACE" && podman inspect -f '{{.State.Running}}' "$WORKSPACE" | grep -q true) >/dev/null 2>&1; then
log "📜 $PERSON is viewing $WORKSPACE's workspace"
if ! podman exec -it -e TERM=tmux-256color --user "$DEV_USER" "$WORKSPACE" tmux attach -r -t "$TMUX_SESSION"; then
if ! podman exec -it -e TERM="$TERM" --user "$DEV_USER" "$WORKSPACE" tmux attach -r -t "$TMUX_SESSION"; then
log "❌ Could not attach to tmux session. Please contact admin or try again later."
exit 1
fi