Skip to content

fix(install): support non-interactive environments and add --yes flag#158

Merged
stephenleo merged 2 commits intomainfrom
non-interactive-installer
Apr 19, 2026
Merged

fix(install): support non-interactive environments and add --yes flag#158
stephenleo merged 2 commits intomainfrom
non-interactive-installer

Conversation

@stephenleo
Copy link
Copy Markdown
Owner

@stephenleo stephenleo commented Apr 19, 2026

Summary

  • Adds a TTY probe (exec 3</dev/tty) before both optional-dependency prompts so Docker RUN steps and CI pipelines no longer fail with No such device or address when /dev/tty is unavailable
  • Adds --yes / -y flag to auto-install all optional deps (Starship, libsecret-tools on Linux) without prompting — useful for Dockerfiles that want a full setup
  • Interactive terminal behaviour is unchanged — prompts still appear when a TTY is available and --yes is not passed
  • Updates README.md and docs/index.md to document all three modes

Behaviour matrix

Context libsecret-tools Starship
--yes / -y auto-install auto-install
Interactive terminal (no flag) prompt (unchanged) prompt (unchanged)
Non-interactive / no TTY skip + message skip + message

Test plan

  • CSHIP_TEST_ROOT=/tmp/t bash install.sh — completes with exit 0, prints skip messages for optional deps
  • CSHIP_TEST_ROOT=/tmp/t bash install.sh --yes — auto-installs Starship (and libsecret-tools on Linux)
  • CSHIP_TEST_ROOT=/tmp/t bash install.sh -y — shorthand works identically
  • bash -n install.sh — syntax check passes
  • Docker reproduction from issue: docker build with RUN curl -fsSL https://cship.dev/install.sh | bash exits 0

Fixes #149

🤖 Generated with Claude Code

stephenleo and others added 2 commits April 19, 2026 21:40
Guard both optional-dependency prompts (libsecret-tools, Starship) with
a TTY probe so Docker RUN steps and CI pipelines no longer fail when
/dev/tty is unavailable. Add --yes / -y flag to auto-install all optional
deps without prompting. Interactive terminal behaviour is unchanged.

Fixes #149

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@stephenleo stephenleo merged commit 5bfa50d into main Apr 19, 2026
3 checks passed
@stephenleo stephenleo deleted the non-interactive-installer branch April 19, 2026 13:45
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.

install.sh fails in non-interactive environments (Docker builds, CI)

1 participant