This repository has been archived by the owner on Jan 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Fixes mode argument with --mode=genanswers #793
Merged
Merged
Conversation
This file contains 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
@@ -483,7 +483,7 @@ def run(self): | |||
cmdline.insert(0, args.action) # Place 'action' at front | |||
|
|||
# Finally, parse args and give error if necessary | |||
args = self.parser.parse_args(cmdline) | |||
args, unknown = self.parser.parse_known_args(cmdline) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of doing this why don't we just delete the --mode
arg from args on line 482
without actually testing this out, i'll say that the code change LGTM. Charlie, do you mind running through some manual testing before you merge? |
#dotests |
@dustymabe sure, going to use |
@dustymabe init doesn't work, genanswers works fine.
is it because when using --mode genanswers will ignore the first argument? (in this case |
#dotests |
When `sudo atomic run projectatomic/helloapache --mode=genanswers` is supplied, the resulting error shows that `--mode=genanswers` is an unrecognized argument. This was introduced after refactoring the cli/main.py code to NOT include uneeded parameters such as --provider-auth to CLI options such as init and genanswers. By moving the --mode parser to the globals_parser, each command will have the --mode option available. Fixes projectatomic#792
OpenShift timed out ^^ ran locally and tests pass. Mergin' |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When
sudo atomic run projectatomic/helloapache --mode=genanswers
issupplied, the resulting error shows that
--mode=genanswers
is anunrecognized argument.
This was introduced after refactoring the cli/main.py code to NOT include
uneeded parameters such as --provider-auth to CLI options such as init
and genanswers.
By adding
self.parser.parse_known_args
, this will ignore the added--mode=genaswers to the CLI.
Fixes #792