Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix registry query flag validation #10648

Merged
merged 1 commit into from Oct 8, 2023
Merged

Fix registry query flag validation #10648

merged 1 commit into from Oct 8, 2023

Conversation

CAD97
Copy link
Contributor

@CAD97 CAD97 commented Oct 8, 2023

Description

Fix the Windows-only registry query command to properly validate that only one hive selection flag (e.g. --hkcu, --hklm). Code to emit this error existed previously, but was accidentally unreachable due to the code structure.

User-Facing Changes

  • registry query now errors if more than one hive selection flag (e.g. --hkcu, --hklm) is used. This was always intended to be an error, but previous versions always used the first flag based on an internal check order instead.

Tests + Formatting

  • toolkit check pr

Documentation

registry query doesn't seem to be in the command reference yet, actually.

@CAD97
Copy link
Contributor Author

CAD97 commented Oct 8, 2023

Fixed the silly mistake, now builds and passes tests.

Side note: you might want to change the workflow approval requirement from "Require approval for first-time contributors" to "Require approval for first-time contributors who are new to GitHub."

@fdncred
Copy link
Collaborator

fdncred commented Oct 8, 2023

Thanks for fixing my crappy code :-)

@fdncred fdncred merged commit ee4e0a9 into nushell:main Oct 8, 2023
@CAD97 CAD97 deleted the patch-2 branch October 9, 2023 00:36
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
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.

registry query fails to emit error for multiple hive flags
2 participants