diff --git a/flytekit/core/context_manager.py b/flytekit/core/context_manager.py index d30eba0918..5b9143fb52 100644 --- a/flytekit/core/context_manager.py +++ b/flytekit/core/context_manager.py @@ -365,7 +365,7 @@ def get( fpath = self.get_secrets_file(group, key, group_version) v = os.environ.get(env_var) if v is not None: - return v + return v.strip() if os.path.exists(fpath): with open(fpath, encode_mode) as f: return f.read().strip()