From 273a5c9f1de59ec919553ad5961f2fab2bc70567 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 29 Sep 2022 14:51:29 -0400 Subject: [PATCH] adding local_stack option for repository setup --- app/setup_repositories.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/setup_repositories.py b/app/setup_repositories.py index f595e7dd..7861aac8 100644 --- a/app/setup_repositories.py +++ b/app/setup_repositories.py @@ -68,7 +68,13 @@ def command(ctx, check_only, pull, branches_file): if verbose: print(f"Branches are: {branches}") - dev_root_path = os.path.expanduser(config("DEV_ROOT", default="~/cerc")) + local_stack = ctx.obj.local_stack + + if local_stack: + dev_root_path = default=os.getcwd()[0:os.getcwd().rindex("stack-orchestrator")]) + print(f'Local stack dev_root_path (CERC_REPO_BASE_DIR) overridden to: {dev_root_path}') + else: + dev_root_path = os.path.expanduser(config("CERC_REPO_BASE_DIR", default="~/cerc")) if not quiet: print(f'Dev Root is: {dev_root_path}')