Skip to content
This repository has been archived by the owner on Jan 19, 2018. It is now read-only.

Commit

Permalink
Fixes mode argument with --mode=genanswers
Browse files Browse the repository at this point in the history
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 #792
  • Loading branch information
cdrage committed Aug 30, 2016
1 parent 0ebf267 commit af728b3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions atomicapp/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,7 @@ def create_parser(self):
none: atomicapp will disable any logging.
If nothing is set and logging to file then 'nocolor' by default.
If nothing is set and logging to tty then 'color' by default.""")

# === DEPLOY PARSER ===
# Create a 'deploy parser' that will include flags related to deploying
# and answers files
deploy_parser = argparse.ArgumentParser(add_help=False)
deploy_parser.add_argument(
globals_parser.add_argument(
"--mode",
dest="mode",
default=None,
Expand All @@ -249,6 +244,11 @@ def create_parser(self):
in cases where a user is not using the Atomic App cli
directly, but through another interface such as the
Atomic CLI. EX: `atomic run <IMAGE> --mode=genanswers`'''))

# === DEPLOY PARSER ===
# Create a 'deploy parser' that will include flags related to deploying
# and answers files
deploy_parser = argparse.ArgumentParser(add_help=False)
deploy_parser.add_argument(
"--dry-run",
dest="dryrun",
Expand Down

0 comments on commit af728b3

Please sign in to comment.