Commit bb9a1997ecf3

Vincent Demeester <vincent@sbr.pm>
2026-06-10 14:39:53
fix(aomi): only exec zsh for interactive bash sessions
Non-interactive SSH commands were being intercepted by the bashrc exec into zsh, causing remote commands to hang.
1 parent c7a956d
Changed files (1)
imperative
imperative/aomi/bootstrap.sh
@@ -287,7 +287,7 @@ setup_shell() {
 	if ! grep -q 'exec.*zsh' ~/.bashrc 2>/dev/null; then
 		log_info "Configuring bash to exec into zsh..."
 		# shellcheck disable=SC2016
-		echo '[ -x "$HOME/.local/state/nix/profile/bin/zsh" ] && exec "$HOME/.local/state/nix/profile/bin/zsh"' >> ~/.bashrc
+		echo '[[ $- == *i* && -x "$HOME/.local/state/nix/profile/bin/zsh" ]] && exec "$HOME/.local/state/nix/profile/bin/zsh"' >> ~/.bashrc
 	fi
 
 	log_info "Shell configured (zsh via bashrc exec)"