From ddd399cd07536d50c302b00b670bc2812040f066 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 14 Apr 2026 11:51:17 +0000 Subject: [PATCH] Expand ~ in _create_bind_dir_if_relative Paths like ~/.credentials/... were treated as relative because ~ is not absolute. expanduser resolves them to /home/user/... before the check, preventing creation of a literal "~" directory. Co-Authored-By: Claude Opus 4.6 (1M context) --- stack_orchestrator/deploy/deployment_create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack_orchestrator/deploy/deployment_create.py b/stack_orchestrator/deploy/deployment_create.py index e7f57c24..be3670ce 100644 --- a/stack_orchestrator/deploy/deployment_create.py +++ b/stack_orchestrator/deploy/deployment_create.py @@ -128,7 +128,7 @@ def _get_named_volumes(stack): # so the deployment will start # Also warn if the path is absolute and doesn't exist def _create_bind_dir_if_relative(volume, path_string, compose_dir): - path = Path(path_string) + path = Path(os.path.expanduser(path_string)) if not path.is_absolute(): absolute_path = Path(compose_dir).parent.joinpath(path) absolute_path.mkdir(parents=True, exist_ok=True)