Skip to content

Stop omarchy-refresh-limine when sudo fails or is cancelled - #20840

Open
ThePrimeagen wants to merge 1 commit into
omacom:quattrofrom
ThePrimeagen:fix/a91daa4a-d263-498b-b91f-19fd19ec547f
Open

ThePrimeagen wants to merge 1 commit into
omacom:quattrofrom
ThePrimeagen:fix/a91daa4a-d263-498b-b91f-19fd19ec547f

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Cancelling or failing the sudo password prompt during omarchy reinstall configs or omarchy refresh limine does not stop bin/omarchy-refresh-limine: its first sudo call sits inside if sudo test -f ... and the script lacks set -e, so the failure is treated as a false test, Resetting limine config is printed, and each remaining sudo command prompts again.

Screenshots

Before After
before after

Reproduce

  1. Open a terminal with Super+Return.
  2. Run sudo -k; omarchy reinstall configs and press Enter.
  3. At the first sudo password prompt, cancel it with Ctrl-C (or let authentication fail).
  4. The script prints Resetting limine config and prompts again for the next sudo instead of returning to the shell.

More cases

Running omarchy refresh limine directly

Before After
before after

Related

Enable set -e in bin/omarchy-refresh-limine and authorize with
`sudo true` before its conditional `sudo test` checks so a failed or
cancelled sudo prompt exits immediately instead of being treated as a
false test and prompting again for the remaining commands. Guard the
`/boot/limine.conf` backup with `if sudo test -f /boot/limine.conf` so
refreshing still restores a missing config under set -e.
@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Stops omarchy-refresh-limine when sudo authorization or a later command fails.

  • Limine refresh stops when sudo fails and skips a missing backup.

No actionable issues found. Tests were inspected, not run.

Reviews (1) · Last reviewed commit: "Stop omarchy-refresh-limine when sudo fa..." · Reviewed by Greptile

@omarchybot omarchybot added the bug Something isn't working label Dec 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Codex (GPT-6, high), Opus 5.5 High and muse-wonder via pi, thinking high checked the sudo failure path and the systemd-boot bypass in the source. GitHub CI passed, and #14073 overlaps but conflicts with current quattro. Worker preflight failed, so the fix is waiting on a worker reproduction.

@chessing234

Copy link
Copy Markdown
Contributor

thanks. a denied sudo still stops the limine refresh before the reset banner. that sudo check is first again, because quattro was reading the machine id before it, in #21227. Please close this PR as superseded by #21227.

@omarchybot

Copy link
Copy Markdown
Collaborator

Codex (GPT-6, high) and Opus 5.5 High compared the Limine diffs. #21227 includes this fix and its regression test, and moves sudo authorization ahead of the machine-ID read. Opus 5.5 High flagged that the order can affect the test on a host without a machine ID. Both PRs are open for the maintainer’s decision. GitHub CI passed here, and worker preflight still blocks reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants