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

CLI run command argument conflict #290

Closed
shawnwall opened this issue Nov 20, 2020 · 2 comments
Closed

CLI run command argument conflict #290

shawnwall opened this issue Nov 20, 2020 · 2 comments

Comments

@shawnwall
Copy link

shawnwall commented Nov 20, 2020

I've created several CLI pythons scripts that utilize click, lets call one test.py. click itself uses --help as a default parameter to get help info. The dotenv CLI also has a --help argument. Running something like:

dotenv -f ../.env run python test.py --help

...results in the --help argument getting used by dotenv, not my script.

  1. Is this intentional, or would this be considered a bug?
  2. Is there a workaround (besides leaving off --help to default to click's help msg)?
@bbc2
Copy link
Collaborator

bbc2 commented Nov 20, 2020

What about dotenv -f ../.env run -- python test.py --help? -- is a common convention to separate options and arguments for the program and click, which we use in python-dotenv, understands that convention.

@shawnwall
Copy link
Author

@bbc2 that worked, thank you very much for your help.

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

No branches or pull requests

2 participants