From cb21e268d1a80d47bdb62c439be558c9f39fbe3d Mon Sep 17 00:00:00 2001 From: Lie Ryan Date: Thu, 14 Mar 2024 15:51:02 +1100 Subject: [PATCH] fix: fix unsetenv to tolerate `environment: null` It should be treated identically as being unset/empty. --- gitops/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitops/core.py b/gitops/core.py index 0e2d405..a90058f 100644 --- a/gitops/core.py +++ b/gitops/core.py @@ -326,7 +326,7 @@ def unsetenv(ctx, filter, values, exclude=""): print(success_negative("Aborted.")) return for app in apps: - environment = app.values.get("environment", {}) + environment = app.values.get("environment") or {} for e in splitenvs: if e in environment: del environment[e]