小编Man*_*tak的帖子

当我收到“./MacOS/Electron: No such file or directory”时,如何从终端启动 VS Code?

当我code在终端中运行时,出现以下错误:

$ code .                                                                                                                                           

/Users/manuphatak/.pyenv/shims/python: line 21: /usr/local/Cellar/pyenv/1.2.21/libexec/pyenv: No such file or directory
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory
Run Code Online (Sandbox Code Playgroud)

这里有一个相关问题:https : //github.com/microsoft/vscode/issues/89037

对于问题中的用户来说,问题神奇地自行解决了,但我该如何解决呢?

我可以直接通过应用程序打开 VS Code。我试过重新安装code命令。

诊断

$ cat "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"                                                                         

#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

function realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; }
CONTENTS="$(dirname "$(dirname "$(dirname …
Run Code Online (Sandbox Code Playgroud)

bash visual-studio-code

1
推荐指数
1
解决办法
611
查看次数

标签 统计

bash ×1

visual-studio-code ×1