Skip to content

Skip sudo -v when passwordless sudo already works - #10395

Closed
calledtoconstruct wants to merge 1 commit into
omacom:quattrofrom
calledtoconstruct:fix/update-stay-awake-nopasswd
Closed

calledtoconstruct wants to merge 1 commit into
omacom:quattrofrom
calledtoconstruct:fix/update-stay-awake-nopasswd

Conversation

@calledtoconstruct

Copy link
Copy Markdown

omarchy-update-stay-awake always ran sudo -v before inhibiting sleep. Stacked sudoers (timestamp vs NOPASSWD) then prompted even when passwordless sudo already worked.

Probe with sudo -n true and only fall back to sudo -v when that fails. A tty still uses sudo; no tty still uses pkexec.

Fixes #10352

@bjarneo

bjarneo commented Sep 21, 2026

Copy link
Copy Markdown
Member

Automated duplication check: this pull request looks similar to #9875, which covers the same stay-awake sudo probe. I keep that one open and close this one to consolidate review.

If you feel this is the wrong decision, please open the PR again with a note on the difference.

@bjarneo bjarneo closed this Sep 21, 2026
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.

omarchy update prompts for password even when the user has a NOPASSWD sudoers drop-in (sudo -v gate)

2 participants