From 693259473e56930afb60c14043f0efaa42795035 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Sun, 19 Oct 2025 21:14:49 +0800 Subject: [PATCH] Check the deployment dir exists when syncing --- stack_orchestrator/deploy/deployment_create.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stack_orchestrator/deploy/deployment_create.py b/stack_orchestrator/deploy/deployment_create.py index 35b66a1a..a2033a54 100644 --- a/stack_orchestrator/deploy/deployment_create.py +++ b/stack_orchestrator/deploy/deployment_create.py @@ -474,6 +474,8 @@ def create_operation(deployment_command_context, spec_file, deployment_dir, sync if opts.o.debug: print(f"Syncing existing deployment at {deployment_dir_path}") else: + if sync: + error_exit(f"--sync requires that {deployment_dir_path} already exists") os.mkdir(deployment_dir_path) # Copy spec file and the stack file into the deployment dir copyfile(spec_file, deployment_dir_path.joinpath(constants.spec_file_name))