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(anta.cli): Disable env variable for --help and --version #869

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

gmuloc
Copy link
Collaborator

@gmuloc gmuloc commented Oct 10, 2024

Description

without this we get

ANTA_VERSION=42 anta get tags

Usage: anta [OPTIONS] COMMAND [ARGS]...
Try 'anta --help' for help.

Error: Invalid value for '--version': '42' is not a valid boolean.


ANTA_HELP=42 anta get tags
Usage: anta [OPTIONS] COMMAND [ARGS]...
Try 'anta --help' for help.

Error: Invalid value for '--help': '42' is not a valid boolean.

Fixes #868

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

Copy link

@gmuloc gmuloc changed the title Fix(anta.cli): Disable env variable for --help and --version fix(anta.cli): Disable env variable for --help and --version Oct 10, 2024
Copy link

codspeed-hq bot commented Oct 10, 2024

CodSpeed Performance Report

Merging #869 will not alter performance

Comparing gmuloc:remove-nasty-envvars (42538a8) with main (2541572)

Summary

✅ 8 untouched benchmarks

@gmuloc gmuloc requested a review from mtache October 10, 2024 14:09
@gmuloc gmuloc added this to the v1.1.0 milestone Oct 10, 2024
Copy link
Contributor

@carl-baillargeon carl-baillargeon left a comment

Choose a reason for hiding this comment

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

Tested locally!

@carl-baillargeon carl-baillargeon merged commit 42bfc3b into aristanetworks:main Oct 10, 2024
21 of 22 checks passed
@gmuloc gmuloc deleted the remove-nasty-envvars branch January 15, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make sure "surprise" env vars don't spoil the ANTA fiesta
2 participants