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

1.x: Fix repoquery subcommand for Python 3.11/3.12 #3170

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

mbargull
Copy link
Contributor

@mbargull mbargull commented Feb 2, 2024

We had a small typo in gh-3036 which caused the args.func == ".repoquery" case to not be caught.
For Python versions prior to 3.11 the args._plugin_subcommand == ".main_repoquery" case has been handled correctly which is why we didn't see problems with mamba repoquery for those versions.

Our tests did not catch this since mamba returned a zero exit code in case of not recognized commands.
This PR changes it to return exit code 1 in these cases now.
(N.B.: Cases like mamba completely-unknown-command are handled with non-zero exit code by argparse.)

Fixes gh-2994 .
Fixes gh-3033 .

Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
@mbargull mbargull changed the title 1.x fix repoquery 1.x: Fix repoquery subcommand for Python 3.11/3.12 Feb 2, 2024
@mbargull mbargull closed this Feb 2, 2024
@mbargull mbargull reopened this Feb 2, 2024
@JohanMabille
Copy link
Member

Thanks!

@JohanMabille JohanMabille merged commit 98e45d1 into mamba-org:1.x Feb 5, 2024
29 of 34 checks passed
@h-vetinari h-vetinari mentioned this pull request Mar 3, 2024
2 tasks
@jezdez
Copy link
Contributor

jezdez commented Mar 5, 2024

Good catch @mbargull!

@@ -778,7 +778,7 @@ def format_param(nm, val):
" deactivate are supported through mamba."
)

return 0
return 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, yeah, that's better.

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.

3 participants