Skip to content

Stop NordVPN installation after setup failure - #8130

Open
llirik0 wants to merge 1 commit into
omacom:quattrofrom
llirik0:fix/issue-7852-nordvpn-fail-fast
Open

llirik0 wants to merge 1 commit into
omacom:quattrofrom
llirik0:fix/issue-7852-nordvpn-fail-fast

Conversation

@llirik0

@llirik0 llirik0 commented Aug 25, 2026

Copy link
Copy Markdown

Summary

  • stop the NordVPN installer immediately when a required setup command fails or is interrupted
  • prevent later privileged steps, the success message, and reboot prompt after an incomplete installation
  • cover package, exit-130 interruption, service, group, and success paths with hermetic command stubs

Closes #7852

Reproduction

The installer previously had no fail-fast mode. If omarchy-pkg-add, sudo systemctl, or sudo usermod returned nonzero, execution continued and could still print:

NordVPN installed! After reboot, run 'nordvpn login' to authenticate.

The regression test reproduces this without installing NordVPN or invoking privileges. Before the fix, a stubbed package failure still reached every later step, the success message, reboot prompt, and reboot command, and the script exited successfully.

The installer now uses the same set -e behavior as comparable Omarchy installers. A required command failure stops the script at that command, and an interruption status of 130 is preserved.

Tests

  • bash -n bin/omarchy-install-service-nordvpn test/shell.d/nordvpn-install-test.sh
  • bash test/shell.d/nordvpn-install-test.sh
  • ./test/all — all 199 test files passed
  • ./bin/omarchy commands --check — all 434 command metadata checks passed
  • git diff --cached --check

Copilot AI balanced review requested due to automatic review settings August 25, 2026 01:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@llirik0
llirik0 force-pushed the fix/issue-7852-nordvpn-fail-fast branch from d659aef to bae9ffe Compare September 5, 2026 23:34
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at bae9ffe, and the fix works. On a worker built from the Omarchy ISO, I ran my own reproduction with a sudo that refuses, as it does when the password prompt is cancelled. The script from quattro ran every later step and printed "NordVPN installed!". This head stopped at the package step with a nonzero exit, and the same head with set -e taken out printed "NordVPN installed!" again. Your new test/shell.d/nordvpn-install-test.sh passes (5 of 5), and so does bin-style-test.sh, with this branch merged onto current quattro. ./test/cli has one failure, "vscode generated theme references current theme file", but quattro fails that one without this change too.

This had no second opinion. The configured reviewer (Codex Medium) was reachable, but its review budget for the day was used up, so this is one model's review.

#9124 makes the same change to bin/omarchy-install-service-nordvpn, byte for byte, and also adds set -e to the dropbox, once and tailscale installers. This one fixes only the script from #7852 but adds a regression test. Only one of the two should land, and that choice is the maintainer's. It is also why this one is not marked ready.

One interaction for whichever lands: #8534 changes this script's usermod line to use id -un instead of $USER. The new test sets USER=omarchy-test and expects usermod -aG nordvpn omarchy-test, so if #8534 lands too, that assertion needs to follow it.

Waiting on the maintainer.

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

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NordVPN installation appears to report a successful installation even when the installation is interrupted and the requires sudo authentication fails

3 participants