feat(ssh): add check for non-interactive terminal

This commit is contained in:
yeti 2025-05-13 16:39:45 +01:00
parent ed903b4879
commit b94cc5537e

View File

@ -12,6 +12,12 @@ log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >>"$LOG_FILE"
}
if [[ ! -t 0 ]]; then
log "❌ No TTY allocated — refusing to run tmux without an interactive terminal"
echo "Error: No TTY. Use 'ssh -t'" >&2
exit 1
fi
# log "🧩 IMAGE = '$IMAGE'"
# log "🧩 WORKSPACE = '$WORKSPACE'"
# log "🧩 PERSON = '$PERSON'"