8000 Bypass main code for "wile [..] --help [..]" invocation by hartwork · Pull Request #13 · costela/wile · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bypass main code for "wile [..] --help [..]" invocation #13

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

Closed
wants to merge 1 commit into from
Closed

Bypass main code for "wile [..] --help [..]" invocation #13

wants to merge 1 commit into from

Conversation

hartwork
Copy link
Contributor

Currently, invocation with --help still executes the wile.py:wile(obj, ...) function body code, e.g. creates an account if missing including asking for a password, see:

# ./wile.py cert request --help
WARNING:wile:no account key found; creating a new 2048 bit key in [..]/.wile/account.key
(optional) Password for [..]/.wile/account.key: ^C

This pull request has a workaround to address this unexpected behaviour.
I did study click documentation and code but if there's something cleaner for detection, it hides well.
Please consider application.

Best, Sebastian

@costela costela self-assigned this Mar 4, 2017
@costela
Copy link
Owner
costela commented Mar 14, 2017

Thanks for the contribution!
This is actually a click problem (pallets/click#295). I was thinking about fixing it in a slightly different way than you propose: namely by taking any code with side-effects out of wile() and into some auxiliary function. Maybe a decorator.
Thoughts?

@hartwork
Copy link
Contributor Author

Thanks for the link to the ticket.
Please go ahead any way you see fits best.

@costela costela added the bug label Jul 12, 2017
@costela costela closed this in aa82852 Jul 13, 2017
@hartwork hartwork deleted the dash-dash-help-fix branch January 11, 2018 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0