使用 vscode 作为 sops 的编辑器 [英] Use vscode as editor for sops

查看:33
本文介绍了使用 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.

有没有人使用 vscodesops 或知道如何在 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

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

这篇关于使用 vscode 作为 sops 的编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆