Stop package install flows after aborts or failures#5545
Open
afurm wants to merge 2 commits intobasecamp:devfrom
Open
Stop package install flows after aborts or failures#5545afurm wants to merge 2 commits intobasecamp:devfrom
afurm wants to merge 2 commits intobasecamp:devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
This PR fixes the package-install flow so it stops immediately when sudo validation is canceled/fails or when underlying install/update commands fail, aligning CLI behavior with user expectations (issue #4869) and preventing misleading “done” notifications or follow-up actions after an abort.
Changes:
- Make
omarchy-sudo-keepalivereturn/exit non-zero ifsudo -vfails (including Ctrl+C at the prompt). - Stop
omarchy-pkg-installandomarchy-pkg-aur-installbefore “done”/follow-up steps when sudo validation, install, orupdatedbfails. - Add hermetic CLI tests with PATH-stubbed
sudo/pacman/yay/fzfto cover abort/failure paths.
Reviewed changes
Copilot reviewed 1 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
bin/omarchy-sudo-keepalive |
Returns non-zero when sudo credential validation fails, preventing downstream flows from continuing. |
bin/omarchy-pkg-install |
Exits early when sudo validation or pacman install fails, avoiding false “done”. |
bin/omarchy-pkg-aur-install |
Exits early on sudo/yay/updatedb failures, preventing follow-up steps after aborts. |
test/omarchy-cli-test.sh |
Adds stubbed, hermetic tests for abort/failure behavior in pkg install flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Fixes #4869 by stopping package install flows when sudo validation is canceled or when the install command fails.
Changes
omarchy-sudo-keepalivereturn/exit non-zero whensudo -vfails.omarchy-pkg-installbefore showing the done notification if sudo orpacmanfails.omarchy-pkg-aur-installbeforeupdatedb/done if sudo oryayfails, and before done ifupdatedbfails.Validation
bash -n bin/omarchy-sudo-keepalive bin/omarchy-pkg-install bin/omarchy-pkg-aur-install test/omarchy-cli-test.shgit diff --check