Use vscode as editor for sops

4.8k views Asked by At

I can't seem to get sops to work with Visual Studio Code as its editor. vscode is already in the PATH. However, sops prints the decrypted content on the console instead of opening the editor.

c:\>code .
----^ this opens the Visual Studio Code editor

c:\>echo %EDITOR%
"code"

c:\>sops-3.1.0.exe --decrypt encrypted.txt
Decrypted content

I've tried setting EDITOR to vscode's full path, same issue.

Has anyone used vscode with sops or know how to do this in Windows?

1

There are 1 answers

1
Amir Keibi On BEST ANSWER

Figured it out!

I should be using code --wait as my EDITOR

Ref: https://github.com/mozilla/sops/issues/127