Repository navigation
Reject a mistyped subcommand instead of running its group parent - #18798
Closed
ThePrimeagen wants to merge 2 commits into
Closed
ThePrimeagen wants to merge 2 commits into
ThePrimeagen wants to merge 2 commits into
Conversation
`omarchy update mispeled` resolved `omarchy-update`, which ignores any word but -y, so a typo opened the real update confirmation and a yes ran a full update. A group parent that documents no operand now refuses a bare word left over after it, on the direct and the alias route. This is omacom#16944, applied onto quattro unchanged. Co-authored-by: Vitally Tezhe <vitally@tezhe.eu> Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com> Co-authored-by: Luca Volpe <lucavolpe97@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
[Medium impact] The PR appears safe to merge, with the previous test finding fully addressed. SummaryRejects mistyped subcommands instead of running group parents that document no operands.
Reviews (2) · Last reviewed commit: "Test the mistyped subcommand through the..." · Reviewed by Greptile |
The agent launcher test called omarchy-agent directly, which already refuses a bare word on quattro, so it passed without the router fix. Replace it with `omarchy update mispeled` through bin/omarchy, which starts the update on quattro and is refused with the fix. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
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.
Mistype a subcommand, as in
omarchy update mispeled, and you get the real "Ready to update?" box with Yes preselected, not an error.bin/omarchyfalls back toomarchy-updateand passes it the typo, andomarchy-updateonly checks whether its first word is-y.Screenshots
Reproduce
omarchy update mispeledand press Enter.omarchy update, where an unknown-command error should be.More cases
omarchy update -y mispeledskips the box and goes straight tosudofor an unattended updateomarchy reinstall configz(meantconfigs) asks to reinstall every package and reset every configEvery other group parent that takes no operand runs with the typo
Also affected
omarchy update -- mispeled:--hands the rest to the command, so it still opens the update box. Not fixed by this change.omarchy-update mispeled, run directly: it never goes throughbin/omarchy, so it still opens the update box. Not fixed by this change.Related
omarchy update firmwreruns a full update) #16770 reports this bug, withomarchy update firmwrerunning a full update-yinsideomarchy-updateonly, soreinstalland the other group parents still run with the typoomarchy update -y mispeled, and was closed in favour of Reject a mistyped subcommand instead of running its group parent #16944--helpis being skipped for bin routes that partially resolve to a file #6787 was the earlier version of this bug, whereomarchy update aur --helpstarted a real update; fix--helpbeing skipped for bin routes that only partially resolve to a file #6788 fixed only the--helppart