Check the deployment dir exists when syncing
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 3m33s
Deploy Test / Run deploy test suite (pull_request) Successful in 8m15s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 12m0s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 13m21s
Webapp Test / Run webapp test suite (pull_request) Successful in 15m5s
Smoke Test / Run basic test suite (pull_request) Successful in 17m54s

This commit is contained in:
Roy Crihfield 2025-10-19 21:14:49 +08:00
parent d0041bc820
commit 693259473e

View File

@ -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))