macOS Version: 13.4.1 (c) (22F770820d)
Visual Studio Code Version: 1.80.2 (Universal)
Visual Studio Code 官方下载
在点击 Code -> Check for Updates时,提示错误:
Cannot update while running on a read-only volume. The application is on a read-only volume. Please move the application and try again. If you're on macOS Sierra or later, you'll need to move the application out of the Downloads directory. This might mean the application was put on quarantine by macOS.
先将下载下来的 VSCode-darwin-universal.zip 解压得到 Visual Studio Code.app,再将 Visual Studio Code.app 移动至 "/Applicatios/"(全局应用程序目录) 或 "~/Applications/"(个人应用程序目录) 或 不移动(不规范,不推荐)。
如果这样还是不能更新,继续:
打开终端执行以下命令:
sudo chown -R $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt
xattr -dr com.apple.quarantine ~/Applications/Visual\ Studio\ Code.app
如果遇到类似于下面的错误:
xattr: [Errno 1] Operation not permitted:
系统设置 -> 隐私与安全性 -> 完全磁盘访问权限 -> 终端
再执行一次:
xattr -dr com.apple.quarantine ~/Applications/Visual\ Studio\ Code.app
最后重启Visual Studio Code