使用 vscode 作为 sops 的编辑器
问题描述:
我似乎无法让 sops
使用 Visual Studio Code
作为其编辑器.vscode
已经在 PATH
中.但是,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
我已经尝试将 EDITOR
设置为 vscode
的完整路径,同样的问题.
I've tried setting EDITOR
to vscode
's full path, same issue.
有没有人使用 vscode
和 sops
或知道如何在 Windows 中执行此操作?
Has anyone used vscode
with sops
or know how to do this in Windows?
答
想通了!
我应该使用 code --wait
作为我的 EDITOR
I should be using code --wait
as my EDITOR