Skip to content

Fix #563: install script fails when piped via curl if tmux is missing#565

Open
asheshgoplani wants to merge 2 commits intomainfrom
fix/563-install-script-pipe-fix
Open

Fix #563: install script fails when piped via curl if tmux is missing#565
asheshgoplani wants to merge 2 commits intomainfrom
fix/563-install-script-pipe-fix

Conversation

@asheshgoplani
Copy link
Copy Markdown
Owner

Summary

  • Wraps the entire install.sh in a main() function so bash reads the full script before executing, preventing partial runs when connection drops during curl | bash
  • Adds prompt_read() helper that redirects interactive read commands to /dev/tty when stdin is piped, so prompts work correctly instead of consuming script bytes

Root cause

When running curl -fsSL ... | bash, stdin is the pipe. The read -p commands either consume bytes meant for bash to parse (corrupting execution) or hit EOF and return non-zero (triggering set -e). Either way, the script installs tmux but exits before installing the agent-deck binary.

Test plan

  • curl -fsSL https://raw.githubusercontent.com/.../install.sh | bash works on a machine without tmux
  • bash install.sh still works when run directly (not piped)
  • curl ... | bash -- --non-interactive works in headless/CI environments
  • bash -n install.sh passes (syntax check)

Fixes #563

The setup wizard welcome step says "Press Esc to use defaults" but
pressing Esc did nothing because prevStep() has no action for the
welcome step. Now Esc on the welcome step completes the wizard with
default configuration, matching the documented behavior.

Committed by Ashesh Goplani
When running `curl ... | bash`, the `read` commands consume bytes from
stdin (the pipe) instead of the terminal, corrupting script execution.
This causes the script to install tmux but exit before installing the
agent-deck binary, requiring a second run.

Two fixes applied:
- Wrap entire script in main() so bash reads it fully before executing
- Add prompt_read() helper that redirects reads to /dev/tty when piped

Fixes #563

Committed by Ashesh Goplani
@asheshgoplani asheshgoplani marked this pull request as ready for review April 12, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initial installation will not finish if tmux is not installed

1 participant