Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use vscode as editor for sops

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?

like image 674
Amir Keibi Avatar asked May 10 '26 10:05

Amir Keibi


1 Answers

Figured it out!

I should be using code --wait as my EDITOR

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

like image 140
Amir Keibi Avatar answered May 18 '26 06:05

Amir Keibi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!