diff --git a/docs/commands.md b/docs/commands.md index 187c208..22c1662 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -14,7 +14,6 @@ These options can be used with any command: |--------|------|-------------|---------| | `--log-file` | TEXT | Log to file (default stdout/stderr) | - | | `--debug` | FLAG | Enable debug options | From config | -| `--stack` | TEXT | Name or path of the stack | - | | `--profile` | TEXT | Configuration profile to use | `config` | | `--verbose` | FLAG | Log extra details | False | | `--quiet` | FLAG | Suppress unnecessary log output | False | diff --git a/src/stack/build/build_containers.py b/src/stack/build/build_containers.py index b681d40..fb47ca4 100644 --- a/src/stack/build/build_containers.py +++ b/src/stack/build/build_containers.py @@ -466,9 +466,6 @@ def build_containers(parent_stack, @click.pass_context def command(ctx, stack, include, exclude, git_ssh, build_policy, extra_build_args, dont_pull_images, publish_images, image_registry, target_arch): """build stack containers""" - if not stack: - stack = ctx.obj.stack_path - stack = resolve_stack(stack) build_containers(stack, build_policy, diff --git a/src/stack/init/init.py b/src/stack/init/init.py index d81dc91..5b06d2f 100644 --- a/src/stack/init/init.py +++ b/src/stack/init/init.py @@ -144,9 +144,6 @@ def command( deploy_to, ) - if not stack: - stack = ctx.obj.stack_path - top_stack_config = resolve_stack(stack) required_stacks = top_stack_config.get_required_stacks_paths() config_variables = {} diff --git a/src/stack/main.py b/src/stack/main.py index 49d7ae9..0b20009 100644 --- a/src/stack/main.py +++ b/src/stack/main.py @@ -45,7 +45,6 @@ @click.group(context_settings=CONTEXT_SETTINGS, cls=StackCLI) @click.option("--log-file", help="Log to file (default stdout/stderr)") @click.option("--debug", help="enable debug options", is_flag=True, default=get_config_setting("debug", False)) -@click.option("--stack", help="name or path of the stack") @click.option( "--profile", help="name of the configuration profile to use", default=os.environ.get("STACK_CONFIG_PROFILE", "config") ) @@ -54,7 +53,7 @@ # TEL: Hide these for now, until we make sure they are consistently implemented. @click.option("--dry-run", is_flag=True, default=False, hidden=True) @click.pass_context -def cli(ctx, profile, quiet, verbose, log_file, dry_run, debug, stack): +def cli(ctx, profile, quiet, verbose, log_file, dry_run, debug): """BPI stack""" if log_file: @@ -68,7 +67,7 @@ def cli(ctx, profile, quiet, verbose, log_file, dry_run, debug, stack): elif quiet: log_level = LOG_LEVELS["warn"] - command_options = CommandOptions(profile, stack, log_level, log_file, dry_run, debug, quiet) + command_options = CommandOptions(profile, None, log_level, log_file, dry_run, debug, quiet) opts.o = command_options ctx.obj = command_options