From 282efc0cbab48d9b597e797f1ee10bef6127e867 Mon Sep 17 00:00:00 2001 From: leixiao <1729888211@qq.com> Date: Fri, 5 Jan 2024 17:38:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8windows=E4=B8=8B=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E7=94=B1=E4=BA=8E=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E6=8A=A5=E9=94=99=E6=8E=A8=E5=87=BA=EF=BC=8C=E5=B0=9D?= =?UTF-8?q?=E8=AF=95=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/util/cmd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/util/cmd.go b/server/util/cmd.go index dbc9d48..2e83a33 100644 --- a/server/util/cmd.go +++ b/server/util/cmd.go @@ -47,7 +47,7 @@ func SetEnv(envToSet string) { if len(keyValue) == 2 { //reg := regexp.MustCompile(`^[A-Za-z0-9_.\s]+$`) err := os.Unsetenv(keyValue[0]) if err != nil { - panic(err.Error()) + log.Println("Error: " + err.Error() + " Code: os.Unsetenv" + keyValue[0]) } } } @@ -57,7 +57,7 @@ func SetEnv(envToSet string) { for key, value := range envMap { err := os.Setenv(key, value) if err != nil { - panic(err.Error()) + log.Println("Error: " + err.Error() + " Code: os.Setenv" + key + ", " + value) } } @@ -78,7 +78,7 @@ func SetEnv(envToSet string) { err := os.Setenv(key, value) if err != nil { - panic(err.Error()) + log.Println("Error: " + err.Error() + " Code: os.Setenv" + key + ", " + value) } } }