From aec61eecb13d28643e2d8646bc9b26a1281c3393 Mon Sep 17 00:00:00 2001 From: wangbo Date: Fri, 31 Jul 2026 18:44:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(acceptance):=20=E5=9B=BA=E5=AE=9A=E7=9B=B8?= =?UTF-8?q?=E5=AF=B9=E5=BF=AB=E7=85=A7=E8=B7=AF=E5=BE=84=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在本地集群脚本切换到 apps/api 前,将已校验的快照路径解析为绝对路径,确保文档中的相对路径可以直接执行。\n\n验证:bash -n、ShellCheck。 --- scripts/acceptance/local-cluster.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/acceptance/local-cluster.sh b/scripts/acceptance/local-cluster.sh index 8ad4680..7150e14 100755 --- a/scripts/acceptance/local-cluster.sh +++ b/scripts/acceptance/local-cluster.sh @@ -411,11 +411,13 @@ up_cluster() { usage >&2 exit 64 } - local snapshot=$2 - [[ -f $snapshot && ! -L $snapshot ]] || { + local snapshot_input=$2 snapshot_dir snapshot + [[ -f $snapshot_input && ! -L $snapshot_input ]] || { echo 'snapshot must be a regular non-symlink file' >&2 exit 1 } + snapshot_dir=$(cd "$(dirname "$snapshot_input")" && pwd -P) + snapshot="$snapshot_dir/$(basename "$snapshot_input")" [[ -z $(git -C "$repository_root" status --short) ]] || { echo 'local acceptance requires a clean source tree so report and image source are reproducible' >&2 exit 1