Skip to content

Commit cb21e26

Browse files
committed
fix: fix unsetenv to tolerate environment: null
It should be treated identically as being unset/empty.
1 parent bcaa588 commit cb21e26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitops/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def unsetenv(ctx, filter, values, exclude=""):
326326
print(success_negative("Aborted."))
327327
return
328328
for app in apps:
329-
environment = app.values.get("environment", {})
329+
environment = app.values.get("environment") or {}
330330
for e in splitenvs:
331331
if e in environment:
332332
del environment[e]

0 commit comments

Comments
 (0)