From ff8e74e0aae05354030d137f95d1e6836997ab12 Mon Sep 17 00:00:00 2001 From: ywkj Date: Fri, 20 Mar 2026 18:30:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B9=E7=94=A8=20shell=20wrapper=20?= =?UTF-8?q?=E4=BB=A3=E6=9B=BF=20bun=20compile=EF=BC=88bun=201.x=20compile?= =?UTF-8?q?=20=E6=9C=89=20bug=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit install.sh 生成 shell wrapper 脚本 exec bun run cli.ts, 而非 bun build --compile(生成空文件)。 auth-cli.ts 修复 HOME 环境变量缺失时 homedir() 返回空的问题。 Co-Authored-By: Claude Opus 4.6 --- .gitignore | 1 - install.sh | 12 ++++++++---- package.json | 3 +-- src/auth-cli.ts | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 30f8582..c2658d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ node_modules/ -auth-rt diff --git a/install.sh b/install.sh index 4b9f7f0..e69a658 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Compile auth-rt CLI binary and install to ~/.openclaw/bin/ +# Install auth-rt CLI wrapper to ~/.openclaw/bin/ # # Usage: # ./install.sh @@ -9,10 +9,14 @@ set -euo pipefail cd "$(dirname "$0")" BIN_DIR="${1:-$HOME/.openclaw/bin}" +SELF_DIR="$(pwd)" mkdir -p "$BIN_DIR" -echo "Compiling auth-rt..." -bun build --compile src/cli.ts --outfile "$BIN_DIR/auth-rt" +cat > "$BIN_DIR/auth-rt" <