Skip to content

Conversation

@irbekrm
Copy link
Contributor

@irbekrm irbekrm commented Dec 29, 2025

Summary

Fixes the download_cli.sh installation script to work correctly when piped into bash (e.g., curl ... | bash), such as suggested by the Goose CLI install instructions. Previously, the read command would fail because stdin was the script itself rather than the terminal, preventing the script from waiting for user input when asking whether to add the goose bin directory to PATH.

  • Adds conditional logic to detect if stdin is a terminal and reads from /dev/tty when it's not

The approach is similar to rustup script

Type of Change

  • Feature
  • [ x] Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • [ x] This PR was created or reviewed with AI assistance

Testing

I have manually tested that with this change the script succeeds when piped into bash (which was not working previously) as well as still works when ran directly on both Mac and Linux.

Related Issues

Relates to #6295

Screenshots/Demos (for UX changes)

Before:

Details Screenshot from 2025-12-29 10-37-08

After:

Details Screenshot from 2025-12-29 10-39-41

Copilot AI review requested due to automatic review settings December 29, 2025 10:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the download_cli.sh installation script to work correctly when piped into bash (e.g., curl ... | bash). Previously, the read command would fail because stdin was the script itself rather than the terminal, preventing the script from waiting for user input when asking whether to add the goose bin directory to PATH.

  • Adds conditional logic to detect if stdin is a terminal and reads from /dev/tty when it's not

Fixes block#6295

Signed-off-by: Irbe Krumina <irbekrm@gmail.com>
@irbekrm irbekrm force-pushed the irbekrm/fix_install_script branch from 82e1b3d to 33e5425 Compare December 29, 2025 11:40
Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@michaelneale michaelneale merged commit c2f5b4c into block:main Jan 5, 2026
18 checks passed
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.

2 participants