Skip to content

Commit 8de8bf5

Browse files
authored
Merge pull request #134 from bozemanpass/dboreham/remove-root-stack-arg
Remove top level --stack argument
2 parents 465e7f4 + f0c10e7 commit 8de8bf5

4 files changed

Lines changed: 2 additions & 10 deletions

File tree

docs/commands.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ These options can be used with any command:
1414
|--------|------|-------------|---------|
1515
| `--log-file` | TEXT | Log to file (default stdout/stderr) | - |
1616
| `--debug` | FLAG | Enable debug options | From config |
17-
| `--stack` | TEXT | Name or path of the stack | - |
1817
| `--profile` | TEXT | Configuration profile to use | `config` |
1918
| `--verbose` | FLAG | Log extra details | False |
2019
| `--quiet` | FLAG | Suppress unnecessary log output | False |

src/stack/build/build_containers.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,6 @@ def build_containers(parent_stack,
466466
@click.pass_context
467467
def command(ctx, stack, include, exclude, git_ssh, build_policy, extra_build_args, dont_pull_images, publish_images, image_registry, target_arch):
468468
"""build stack containers"""
469-
if not stack:
470-
stack = ctx.obj.stack_path
471-
472469
stack = resolve_stack(stack)
473470
build_containers(stack,
474471
build_policy,

src/stack/init/init.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ def command(
144144
deploy_to,
145145
)
146146

147-
if not stack:
148-
stack = ctx.obj.stack_path
149-
150147
top_stack_config = resolve_stack(stack)
151148
required_stacks = top_stack_config.get_required_stacks_paths()
152149
config_variables = {}

src/stack/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
@click.group(context_settings=CONTEXT_SETTINGS, cls=StackCLI)
4646
@click.option("--log-file", help="Log to file (default stdout/stderr)")
4747
@click.option("--debug", help="enable debug options", is_flag=True, default=get_config_setting("debug", False))
48-
@click.option("--stack", help="name or path of the stack")
4948
@click.option(
5049
"--profile", help="name of the configuration profile to use", default=os.environ.get("STACK_CONFIG_PROFILE", "config")
5150
)
@@ -54,7 +53,7 @@
5453
# TEL: Hide these for now, until we make sure they are consistently implemented.
5554
@click.option("--dry-run", is_flag=True, default=False, hidden=True)
5655
@click.pass_context
57-
def cli(ctx, profile, quiet, verbose, log_file, dry_run, debug, stack):
56+
def cli(ctx, profile, quiet, verbose, log_file, dry_run, debug):
5857
"""BPI stack"""
5958

6059
if log_file:
@@ -68,7 +67,7 @@ def cli(ctx, profile, quiet, verbose, log_file, dry_run, debug, stack):
6867
elif quiet:
6968
log_level = LOG_LEVELS["warn"]
7069

71-
command_options = CommandOptions(profile, stack, log_level, log_file, dry_run, debug, quiet)
70+
command_options = CommandOptions(profile, None, log_level, log_file, dry_run, debug, quiet)
7271
opts.o = command_options
7372
ctx.obj = command_options
7473

0 commit comments

Comments
 (0)