使用 vscode 作为 sops 的编辑器

Use vscode as editor for sops

我似乎无法让 sopsVisual Studio Code 一起工作。 vscode 已经在 PATH 中。但是,sops 在控制台上打印解密的内容,而不是打开编辑器。

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

c:\>echo %EDITOR%
"code"

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

我试过将 EDITOR 设置为 vscode 的完整路径,同样的问题。

有人在 sops 中使用过 vscode 或者知道如何在 Windows 中使用吗?

想通了!

我应该使用 code --wait 作为我的 EDITOR

参考:https://github.com/mozilla/sops/issues/127