{"record":{"id":"9a41a38e42c36b41","repo":"getsops/sops","slug":"invalid-dotenv-input-line-s","errorCode":null,"errorMessage":"invalid dotenv input line: %s","messagePattern":"invalid dotenv input line: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"stores/dotenv/store.go","lineNumber":62,"sourceCode":"// LoadPlainFile returns the contents of a plaintext file loaded onto a\n// sops runtime object\nfunc (store *Store) LoadPlainFile(in []byte) (sops.TreeBranches, error) {\n\tvar branches sops.TreeBranches\n\tvar branch sops.TreeBranch\n\n\tfor _, line := range bytes.Split(in, []byte(\"\\n\")) {\n\t\tif len(line) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif line[0] == '#' {\n\t\t\tbranch = append(branch, sops.TreeItem{\n\t\t\t\tKey:   sops.Comment{Value: string(line[1:])},\n\t\t\t\tValue: nil,\n\t\t\t})\n\t\t} else {\n\t\t\tpos := bytes.Index(line, []byte(\"=\"))\n\t\t\tif pos == -1 {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid dotenv input line: %s\", line)\n\t\t\t}\n\t\t\tbranch = append(branch, sops.TreeItem{\n\t\t\t\tKey:   string(line[:pos]),\n\t\t\t\tValue: strings.Replace(string(line[pos+1:]), \"\\\\n\", \"\\n\", -1),\n\t\t\t})\n\t\t}\n\t}\n\n\tbranches = append(branches, branch)\n\treturn branches, nil\n}\n\n// EmitEncryptedFile returns the encrypted file's bytes corresponding to a sops\n// runtime object\nfunc (store *Store) EmitEncryptedFile(in sops.Tree) ([]byte, error) {\n\tbranches, err := stores.SerializeMetadata(in, stores.MetadataOpts{\n\t\tFlatten: stores.MetadataFlattenFull,\n\t})","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/stores/dotenv/store.go#L44-L80","documentation":"Error \"invalid dotenv input line: %s\" thrown in getsops/sops.","triggerScenarios":"Thrown at stores/dotenv/store.go:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13442bb98183887d7a9ac09ec8ab0564673a59d8","analyzedAt":"2026-09-01T03:53:00.447Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}