2

我的 devcontainer 需要来自已安装卷的配置文件。如果创建容器后该文件不存在,我想创建一个新文件并在 vscode 中打开它,以便用户提供内容。

我用了

"postCreateCommand": "test ! -f /root/.config/openstack/clouds.yaml && (mkdir -p /root/.config/openstack; code --wait /root/.config/openstack/clouds.yaml)",

但它抱怨code or code-insiders is not installed

这样做的正确方法是什么?

4

0 回答 0