From 68eab3d6c164eaa6eb8b4fb4c34a799b062e70fc Mon Sep 17 00:00:00 2001 From: ywkj Date: Fri, 20 Mar 2026 20:34:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20auth-rt=20auto-install=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=B0=B8=E4=B9=85=E8=B7=AF=E5=BE=84=20~/.local/share/?= =?UTF-8?q?auth-runtime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复之前 clone 到 /tmp 后删除导致 wrapper 指向不存在路径的问题。 Co-Authored-By: Claude Opus 4.6 --- install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 975ba1f..b09e18d 100755 --- a/install.sh +++ b/install.sh @@ -3,12 +3,15 @@ set -euo pipefail cd "$(dirname "$0")" # Auto-install auth-rt if not found +_AUTH_RT_SRC="$HOME/.local/share/auth-runtime" if ! command -v auth-rt &>/dev/null && [ ! -x "$HOME/.local/bin/auth-rt" ]; then echo "auth-rt not found, installing..." - _tmp="$(mktemp -d)" - git clone --depth 1 http://192.168.0.108:3030/agent-skills/auth-runtime.git "$_tmp/auth-runtime" - bash "$_tmp/auth-runtime/install.sh" - rm -rf "$_tmp" + if [ -d "$_AUTH_RT_SRC/.git" ]; then + git -C "$_AUTH_RT_SRC" pull --ff-only + else + git clone --depth 1 http://192.168.0.108:3030/agent-skills/auth-runtime.git "$_AUTH_RT_SRC" + fi + bash "$_AUTH_RT_SRC/install.sh" fi npm install