From be1ca3db0231ede740fa22bbce42e442bc0f71aa Mon Sep 17 00:00:00 2001 From: Even Bell <130771607+2000e@users.noreply.github.com> Date: Fri, 27 Jun 2025 08:21:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +-- patch-code.sh | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c9bc2b5..e7d7e7e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ git clone --depth 1 https://git.unvec.site/stevenhobs/vscode-patch ~/.vscode-patch ``` -2. 添加执行权限 `chmod +x -r ~/.vscode-patch` +2. 添加执行权限 `chmod -R +751 ~/.vscode-patch` 3. 补丁VSCode `~/.vscode-patch/patch-code.sh [VSCode App安装路径]` - diff --git a/patch-code.sh b/patch-code.sh index f01d778..e3bed77 100644 --- a/patch-code.sh +++ b/patch-code.sh @@ -6,7 +6,11 @@ if [ ! -d "$VSCODE_PATCH_DIR/lib" ]; then fi VSCODE_APP_PATH="" if [ -n "$1" ]; then - VSCODE_APP_PATH="$1" + if [[ "$1" != /* ]]; then + VSCODE_APP_PATH="$(realpath "$1")" + else + VSCODE_APP_PATH="$1" + fi else read -p "指定VSCode App路径: " VSCODE_APP_PATH fi