Skip to content

Fix app update for pkg-installed NoxKey#264

Merged
JasperNoBoxDev merged 1 commit intomainfrom
fix-update-sudo
Mar 25, 2026
Merged

Fix app update for pkg-installed NoxKey#264
JasperNoBoxDev merged 1 commit intomainfrom
fix-update-sudo

Conversation

@JasperNoBoxDev
Copy link
Copy Markdown
Contributor

@JasperNoBoxDev JasperNoBoxDev commented Mar 25, 2026

Summary

  • noxkey update --app failed with permission denied when app was pkg-installed (root-owned)
  • Now tries non-root rm+cp first, falls back to osascript ... with administrator privileges for a native macOS admin password dialog

Test plan

  • Run noxkey update --app on a pkg-installed NoxKey → should show macOS admin prompt → update succeeds

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved macOS app update reliability: the update process now handles app ownership constraints by automatically requesting administrator privileges when necessary, ensuring successful updates in all scenarios.

The update command failed with permission denied when the app was
installed via pkg (root-owned). Now tries non-root first, falls back
to osascript admin prompt (standard macOS pattern for privileged installs).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@JasperNoBoxDev JasperNoBoxDev merged commit 84d1a7b into main Mar 25, 2026
@JasperNoBoxDev JasperNoBoxDev deleted the fix-update-sudo branch March 25, 2026 22:52
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 081ecb24-4926-4dc5-87b2-2e29a4911308

📥 Commits

Reviewing files that changed from the base of the PR and between db13a1b and e87a96b.

📒 Files selected for processing (1)
  • NoxKey/noxkey-cli

📝 Walkthrough

Walkthrough

The macOS app installation during noxkey update --app now attempts a destructive replace-and-copy operation at the user permission level, with automatic fallback to an administrator-prompted osascript execution if the initial attempt fails. The remainder of the update flow proceeds unchanged.

Changes

Cohort / File(s) Summary
macOS App Update Script
scripts/...update*, ...install* or similar shell script
Added user-context installation attempt with osascript fallback for admin privileges; handles cases where app is root-owned from prior pkg installs; error suppression and conditional branching added (+6/-2 lines).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hop, hop—no admin blues!
One path fails, another we choose,
User then guardian, both in the dance,
NoxKey updates get a second chance! 🎉

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-update-sudo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant