From b494acfa12175164def4c58e31e33f3ac9bd2218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AI=E4=B8=8D=E6=AD=A2=E8=AF=AD?= <12096460+jnMetaCode@users.noreply.github.com> Date: Sat, 20 Jun 2026 09:09:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(test):=20opencode=20setup.sh=20=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E6=8B=B7=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=20lib/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/opencode/setup.sh 从上游照搬了 `cp -r $REPO_ROOT/lib`,但本 fork 没有 lib/ 目录,导致 test-plugin-loading.sh 在 setup 阶段就 cp 失败、 整个 opencode 测试套件飘红(既有问题,CI 不跑、不拦门)。 本 fork 的 opencode 插件(.opencode/plugins/superpowers.js)自包含、 仅 readFileSync 读取 ../../skills,不依赖 lib,故删除该多余拷贝。 验证:bash tests/opencode/run-tests.sh → STATUS: PASSED(1 passed/0 failed)。 --- tests/opencode/setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/opencode/setup.sh b/tests/opencode/setup.sh index 0defde2..a7e9272 100755 --- a/tests/opencode/setup.sh +++ b/tests/opencode/setup.sh @@ -13,8 +13,9 @@ export XDG_CONFIG_HOME="$TEST_HOME/.config" export OPENCODE_CONFIG_DIR="$TEST_HOME/.config/opencode" # Install plugin to test location +# 注:本 fork 的 opencode 插件(superpowers.js)自包含、仅读取 ../../skills, +# 不依赖上游的 lib/(fork 无此目录),故不拷 lib。 mkdir -p "$HOME/.config/opencode/superpowers" -cp -r "$REPO_ROOT/lib" "$HOME/.config/opencode/superpowers/" cp -r "$REPO_ROOT/skills" "$HOME/.config/opencode/superpowers/" # Copy plugin directory