getsops/sops · error
the dotenv store only supports emitting strings, got %T
Error message
the dotenv store only supports emitting strings, got %T
What it means
Error "the dotenv store only supports emitting strings, got %T" thrown in getsops/sops.
Source
Thrown at stores/dotenv/store.go:118
if !ok {
value = stores.ValToString(item.Value)
} else {
value = strings.ReplaceAll(value, "\n", "\\n")
}
line = fmt.Sprintf("%s=%s\n", item.Key, value)
}
buffer.WriteString(line)
}
return buffer.Bytes(), nil
}
// EmitValue returns a single value as bytes
func (Store) EmitValue(v interface{}) ([]byte, error) {
if s, ok := v.(string); ok {
return []byte(s), nil
}
return nil, fmt.Errorf("the dotenv store only supports emitting strings, got %T", v)
}
// EmitExample returns the bytes corresponding to an example Flat Tree runtime object
func (store *Store) EmitExample() []byte {
bytes, err := store.EmitPlainFile(stores.ExampleFlatTree.Branches)
if err != nil {
panic(err)
}
return bytes
}
// Deprecated: use stores.IsComplexValue() instead!
func IsComplexValue(v interface{}) bool {
return stores.IsComplexValue(v)
}
// HasSopsTopLevelKey checks whether a top-level "sops" key exists.
func (store *Store) HasSopsTopLevelKey(branch sops.TreeBranch) bool {View on GitHub (pinned to 13442bb981)
When it happens
Trigger: Thrown at stores/dotenv/store.go:118 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of getsops/sops@13442bb981 (2026-09-01).
Data as JSON: /api/errors/396078769de11c76.
Report an issue: GitHub.