Fix misleading usage string in create-envfile.py#619
Open
Valyrian-Code wants to merge 1 commit into
Open
Conversation
The argparse usage advertised a positional 'localhost', but the parser only accepts the host via -hn/--hostname, so the documented invocation 'python create-envfile.py localhost' failed with 'unrecognized arguments: localhost'. Align the usage string with the actual interface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
argparseusagestring increate-envfile.pyadvertises a positionallocalhost:but the parser only accepts the host via
-hn/--hostname— there is no positional argument. So the documented invocation fails:This wrong string is printed by
--helpand on every parse error, which is misleading at the very first setup step a new deployer hits.Fix
Align the
usagestring with the actual interface (one line):Verification
python create-envfile.py --helpnow shows the corrected usage.python create-envfile.py -hn localhost --noinputruns and generates.env(previously the documented positional form errored).