Skip to content

Commit a87e1d6

Browse files
committed
Allow default env to be set by env var
1 parent f581170 commit a87e1d6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/zocalo/configuration/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,11 @@ def activate(
169169
envs = zocalo.configuration.argparse.get_specified_environments(
170170
arguments=self.environment_cmd_args
171171
)
172-
if default and not envs and "default" in self._environments:
173-
envs = ["default"]
172+
if default and not envs:
173+
if os.environ.get("ZOCALO_DEFAULT_ENV"):
174+
envs = [os.environ["ZOCALO_DEFAULT_ENV"]]
175+
elif "default" in self._environments:
176+
envs = ["default"]
174177
for environment in envs:
175178
self.activate_environment(environment)
176179
return tuple(envs)

0 commit comments

Comments
 (0)