Skip to content

Commit 312a9af

Browse files
committed
Move --stack
1 parent 7784851 commit 312a9af

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/stack/deploy/deploy.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@
5454
def command(ctx, include, exclude, env_file, cluster, deploy_to):
5555
"""create and configure a new stack deployment"""
5656

57-
# Although in theory for some subcommands (e.g. init create) the stack can be inferred,
58-
# Click doesn't allow us to know that here, so we make providing the stack mandatory
59-
stack = global_options2(ctx).stack
60-
if stack:
61-
stack = get_stack_path(stack)
62-
6357
if ctx.parent.obj.debug:
6458
print(f"ctx.parent.obj: {ctx.parent.obj}")
6559

@@ -69,7 +63,7 @@ def command(ctx, include, exclude, env_file, cluster, deploy_to):
6963
ctx.obj = create_deploy_context(
7064
global_options2(ctx),
7165
None,
72-
stack,
66+
None,
7367
include,
7468
exclude,
7569
cluster,

src/stack/deploy/deployment_create.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ def init(
304304

305305
deployer_type = ctx.obj.deployer.type
306306
deploy_command_context = ctx.obj
307+
deploy_command_context.stack = stack
307308
return init_operation(
308309
deploy_command_context,
309310
stack,

0 commit comments

Comments
 (0)