sops
sops copied to clipboard
sops edits a readonly temp file on Windows
I have a sops encrypted file foo.enc.json and when I run sops foo.enc.json, vim tells me:
"~\AppData\Local\Temp\1012848330\foo.enc.json" [readonly][Incomplete last line][unix format] 3 lines, 13 characters
This happens both on Windows and Cygwin, so I guess it's an issue with the Windows binary. This issue doesn't appear on the Linux binary. Tested on Sops v3.7.2.
I think the function in editTree in edit.go is where it's at, but my Go's real rusty. Please tell me if I can assist in some way.
https://github.com/mozilla/sops/blob/v3.7.2/cmd/sops/edit.go#L110