From b17146def5164fc655eac0eefb023acaa20b5831 Mon Sep 17 00:00:00 2001 From: cweld510 Date: Thu, 5 Sep 2024 17:52:00 +0000 Subject: [PATCH] simplify per Howard's suggestion --- modal/cli/environment.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modal/cli/environment.py b/modal/cli/environment.py index 15c2542e3..14a6af402 100644 --- a/modal/cli/environment.py +++ b/modal/cli/environment.py @@ -42,12 +42,9 @@ def list(json: Optional[bool] = False): # determine which environment is currently active, prioritizing the local default # over the server default - cfg_default = config.get("environment") - active_env = None + active_env = config.get("environment") for env in envs: - if env.name == cfg_default: - active_env = env.name - elif env.default is True and active_env is None: + if env.default is True and active_env is None: active_env = env.name table_data = []