Repository navigation
Conversation
`omarchy-sudo-passwordless --help` printed only the bare argument list to stderr and exited 1, as if the flag were an invalid duration. Nothing told the user that running it with no argument turns access off when it is on and otherwise asks how long to allow it, what `--active` and `--disable` do, or that `permanent` survives reboots. Handle `-h`/`--help` explicitly, print a usage block that describes each mode, and keep the stderr/exit-1 form for invalid arguments. Give the router's help the same picture through the summary and examples. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
[Low impact] The PR appears safe to merge. SummaryAdds explicit
Reviews (1) · Last reviewed commit: "Explain the passwordless sudo modes in i..." · Reviewed by Greptile |
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.
omarchy-sudo-passwordless --helpprinted onlyUsage: omarchy-sudo-passwordless [MINUTES|permanent|--active|--disable]to stderr and exited 1, the same as an invalid duration. Nothing told the user that running it with no argument turns access off when it is on and otherwise asks how long to allow it, what--activeand--disabledo, or thatpermanentsurvives reboots.omarchy sudo passwordless --helpshowed the same bare argument list with no examples.This handles
-h/--helpexplicitly, prints a usage block to stdout that describes each mode, and keeps the stderr/exit-1 form for invalid arguments. The router's help gets the same picture through the summary and examples:Context: on the 4.0.x command, Ctrl-C at the password prompt fell through to the enable path and announced a 15-minute default that was never asked for.
quattroalready fixes that (#14435 asks for a duration, and the security traps exit on Ctrl-C), but its help still left the modes and the duration prompt unexplained.Tested with
bash test/shell.d/nopasswd-sudo-expiry-test.sh(the added check fails onquattrowithout the script change) and./test/cli.🤖 Generated with Claude Code