fix env bug: value contains '=' not work

This commit is contained in:
2026-07-08 12:04:42 +08:00
parent f5d369bee8
commit 289fb211e1
+1 -1
View File
@@ -50,7 +50,7 @@ func parseEnvFileAndSetEnv(filePath string, printToScreen, printWithExport bool)
continue continue
} }
parts := strings.Split(trimedLine, "=") parts := strings.Split(trimedLine, "=")
if len(parts) != 2 { if len(parts) < 2 {
return "", fmt.Errorf("line %v is malformed: `%v`", i+1, trimedLine) return "", fmt.Errorf("line %v is malformed: `%v`", i+1, trimedLine)
} }
if strings.TrimSpace(parts[0]) != parts[0] { if strings.TrimSpace(parts[0]) != parts[0] {