Repository navigation
fix: don't cancel a guided install when the terminal can't be read - #93
Merged
Merged
Conversation
On Ubuntu 25.10, "curl ... | sudo sh" printed the first question and cancelled at once. Ubuntu 25.10 ships sudo-rs, which keeps the keyboard from a script that is piped in, so the read from /dev/tty failed. install.sh took the failed read as an empty answer, and the empty answer as "no". - A failed read is now a refusal, refuse=terminal_read, with nothing changed. get.sh then prints the command form that works. - The README and the get.sh header give that form first: sudo sh -c "$(curl -fsSL <url>/get.sh)". The piped form stays for scripts that pass --yes. Tested through a terminal in containers. On Ubuntu 25.10 the piped form refuses with the hint, and the sh -c form installs. Ubuntu 25.04, Debian 13, Fedora 42, AlmaLinux 9, Amazon Linux 2023, openSUSE Leap 15.6 and Arch install with both forms. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
spydisec
added a commit
that referenced
this pull request
Nov 12, 2026
Summary: on Ubuntu 26.04, `curl ... | sudo sh` hung at the first question. It now refuses with the same hint as on Ubuntu 25.10. ## Cause #93 made a failed terminal read a refusal. That covers sudo-rs 0.2.8 on Ubuntu 25.10, where the read fails. Under sudo-rs 0.2.13 on Ubuntu 26.04 the read doesn't fail. The piped script runs in the background of the terminal, so the kernel stops it when it reads the keyboard, and it stays stopped. ## Fix `install.sh` ignores that stop signal (`TTIN`) when `sudo -V` says sudo-rs. The read then fails, and install refuses with `terminal_read` and the hint. The classic sudo moves a stopped script to the foreground, so the piped form works there. A first version ignored the signal everywhere, and that broke the piped form on Ubuntu 24.04, so the signal is left alone unless sudo is sudo-rs. ## Tested Guided install through a real terminal in containers, with `--skip-load`: | System | sudo | Piped into sudo | `sudo sh -c` | |---|---|---|---| | Ubuntu 26.04 | sudo-rs 0.2.13 | refuses with the hint (hung before) | installs | | Ubuntu 25.10 | sudo-rs 0.2.8 | refuses with the hint | installs | | Ubuntu 24.04 | 1.9.15 | installs | installs | | Debian 13 | 1.9.16 | installs | installs | | AlmaLinux 9 | 1.9.17 | installs | installs | Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: on Ubuntu 25.10,
curl ... | sudo shprinted the first question and cancelled before the user could type. A failed terminal read is now a clear refusal, and the docs give a command form that works on every system.Cause
Ubuntu 25.10 ships sudo-rs in place of the classic sudo. It keeps the keyboard from a script that is piped into it, so the read from
/dev/ttyfails at once.install.shtook the failed read as an empty answer, and the empty answer as "no".Fix
refuse=terminal_readand exits 1. Nothing has changed at that point, because all questions come before the backup.sudo sh -c "$(curl -fsSL <url>/get.sh)". The piped form stays for scripts that pass--yes, which asks nothing.Tested
Guided install through a real terminal in containers, with
--skip-load, both command forms:sudo sh -cEach untested system printed the
untested_oswarning and went ahead, as designed.Not covered by an automated test: the guided questions need a terminal, which bats and the CI container job don't have.