Replies: 1 comment
-
|
Since you're creating files programmatically, check for an empty file before calling Also checking for empty (not non-existing) files is an extremely special use-case, which I don't think will ever be supported. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When running
sops setorsops editagainst an empty YAML file, an errorsops metadata not foundis returned. This make sense for non-empty files, but erroring on empty files make it hard to do "upsert" when generating SOPS files programmatically. For example, if I want to implement the following behavior, it would be awkward: Set field foo to bar in file foobar.yaml, and create a new one with foo=bar if foobar.yaml does not exist. I have to handle the update and create case completely separately.Any ideas or workarounds are very appreciated.
Beta Was this translation helpful? Give feedback.
All reactions