Skip to content

Stop package install flows after aborts or failures#5545

Open
afurm wants to merge 2 commits intobasecamp:devfrom
afurm:af/stop-pkg-install-after-abort
Open

Stop package install flows after aborts or failures#5545
afurm wants to merge 2 commits intobasecamp:devfrom
afurm:af/stop-pkg-install-after-abort

Conversation

@afurm
Copy link
Copy Markdown
Contributor

@afurm afurm commented May 2, 2026

Summary

Fixes #4869 by stopping package install flows when sudo validation is canceled or when the install command fails.

Changes

  • Make omarchy-sudo-keepalive return/exit non-zero when sudo -v fails.
  • Stop omarchy-pkg-install before showing the done notification if sudo or pacman fails.
  • Stop omarchy-pkg-aur-install before updatedb/done if sudo or yay fails, and before done if updatedb fails.
  • Add hermetic tests with stubs for the abort/failure paths.

Validation

  • bash -n bin/omarchy-sudo-keepalive bin/omarchy-pkg-install bin/omarchy-pkg-aur-install test/omarchy-cli-test.sh
  • git diff --check
  • Focused package-install test section passed

Copilot AI review requested due to automatic review settings May 2, 2026 06:08
Copy link
Copy Markdown
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

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-keepalive return/exit non-zero if sudo -v fails (including Ctrl+C at the prompt).
  • Stop omarchy-pkg-install and omarchy-pkg-aur-install before “done”/follow-up steps when sudo validation, install, or updatedb fails.
  • Add hermetic CLI tests with PATH-stubbed sudo/pacman/yay/fzf to 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.

Comment thread test/omarchy-cli-test.sh
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.

Ctrl+C during sudo password prompt in pkg-install/pkg-aur-install does not abort the process

2 participants