Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

update regex to capature comment

Maidul Islama685ac3e73ec
diff --git a/cli/packages/cmd/secrets.go b/cli/packages/cmd/secrets.go
index a1a8916fd9..a00cacaea5 100644
--- a/cli/packages/cmd/secrets.go
+++ b/cli/packages/cmd/secrets.go
@@ -474,7 +474,7 @@ func generateExampleEnv(cmd *cobra.Command, args []string) {
listOfKeyValue := []string{}
for _, secret := range secretDetails.Secrets {
- re := regexp.MustCompile(`(.*)DEFAULT:(.*)`)
+ re := regexp.MustCompile(`(?s)(.*)DEFAULT:(.*)`)
match := re.FindStringSubmatch(secret.Comment)
defaultValue := ""
comment := secret.Comment