arch-updater: fix flatpak update always declining in terminal mode - #507
Open
sandrigo wants to merge 2 commits into
Open
arch-updater: fix flatpak update always declining in terminal mode#507sandrigo wants to merge 2 commits into
sandrigo wants to merge 2 commits into
Conversation
buildTerminalCommand() pipes the whole update run's output into `tee` for the log. flatpak's Y/n confirmation gates on isatty(stdout), so under `tee` it always sees a non-tty stdout, treats itself as non-interactive, and auto-answers "n" no matter what the user types - this is a known flatpak behavior (flatpak/flatpak#4409). pacman and the AUR helpers don't have this restriction, so their prompts keep working fine in the same pipeline; only flatpak's leg silently fails with exit 1. Since real interactivity for the flatpak step can't work here anyway, pass -y --noninteractive to it in terminal mode too, matching what background mode already does. pacman/AUR review stays fully interactive.
Contributor
Reiling-Jeff
approved these changes
Aug 29, 2026
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.
Plugin
yuuto/arch-updaterplugin.toml)What it does
Fixes an issue where Update in terminal mode always fails on the Flatpak step: it auto-declines its own
[Y/n]confirmation with "n" and exits 1, no matter what is typed. pacman/AUR prompts in the same run are unaffected.External dependencies
None new. The Flatpak leg still shells out to the same
flatpak updatealready listed independenciesinplugin.toml, just with different flags.Testing
Reproduced on my own machine (CachyOS, Niri, arch-updater 2.0.1,
update_mode = terminal,flatpak_enabled = true): triggered Update from the bar widget with pending pacman/AUR and Flatpak updates. pacman/AUR update applied normally with interactive prompts; the Flatpak update prompt appeared, then auto-answered "n" on its own, and the run ended with::EXIT 1.Applied this fix locally against the installed plugin and re-ran Update the same way: pacman/AUR stayed fully interactive (PKGBUILD review, conflict prompts, etc. untouched), the Flatpak updates applied without any prompt, and the run completed with
::EXIT 0.Root cause:
buildTerminalCommand()pipes the whole run's output intoteefor the log ({ ...; } 2>&1 | tee -a $log). flatpak's own Y/n confirmation gates onisatty(stdout), so once stdout is a pipe intoteeit always treats itself as non-interactive and auto-answers "n" — a known flatpak behavior, see flatpak/flatpak#4409. pacman and the AUR helpers don't gate their prompts on stdout being a tty, so they're unaffected by the sametee. Since real interactivity for the Flatpak step isn't achievable here, this passes-y --noninteractiveto it in terminal mode too, matching whatbuildBackgroundCommand()already does.Screenshots / Videos
No visual/UI surface changes — this only changes the flags passed to an existing shell command; the panel and widget are unchanged.
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
licensedeclared inplugin.toml.