sops icon indicating copy to clipboard operation
sops copied to clipboard

sops edits a readonly temp file on Windows

Open Northburns opened this issue 3 years ago • 0 comments

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

Northburns avatar Apr 20 '22 06:04 Northburns