Skip to content

Commit 2946d1a

Browse files
committed
Allowing overide of CFG_(DIR|FILE) from ENV to support multiple endpoints via post(de)activate in our virtual environments
1 parent 11bfd57 commit 2946d1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stackdio/cli/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class StackdioShell(
2424
mixins.formulas.FormulaMixin,
2525
mixins.blueprints.BlueprintMixin):
2626

27-
CFG_DIR = os.path.expanduser("~/.stackdio-cli/")
28-
CFG_FILE = os.path.join(CFG_DIR, "config.json")
27+
CFG_DIR = os.path.expanduser(os.getenv('STACKDIO_CFG_DIR',"~/.stackdio-cli/"))
28+
CFG_FILE = os.path.join(CFG_DIR, os.getenv('STACKDIO_CFG_FILE',"config.json"))
2929
BOOTSTRAP_FILE = os.path.join(CFG_DIR, "bootstrap.yaml")
3030
KEYRING_SERVICE = "stackdio_cli"
3131
PROMPT = "\n{username} @ {url}\n> "

0 commit comments

Comments
 (0)