From 1a498b0b7690673b514e5ed74d958eed42acb042 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 21 Jan 2023 17:26:52 -0500 Subject: [PATCH] fix: handle nil map issue --- plugins/common/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/common/common.go b/plugins/common/common.go index 8e0091438..cfadb36fd 100644 --- a/plugins/common/common.go +++ b/plugins/common/common.go @@ -76,7 +76,7 @@ func CommandUsage(helpHeader string, helpContent string) { // EnvWrap wraps a func with a setenv call and resets the value at the end func EnvWrap(fn func() error, environ map[string]string) error { - var oldEnviron map[string]string + oldEnviron := map[string]string{} for key, value := range environ { oldEnviron[key] = os.Getenv(key) if err := os.Setenv(key, value); err != nil {