fix(acceptance): 固定相对快照路径解析

在本地集群脚本切换到 apps/api 前,将已校验的快照路径解析为绝对路径,确保文档中的相对路径可以直接执行。\n\n验证:bash -n、ShellCheck。
This commit is contained in:
2026-07-31 18:44:50 +08:00
parent 0b9634b74c
commit aec61eecb1
+4 -2
View File
@@ -411,11 +411,13 @@ up_cluster() {
usage >&2 usage >&2
exit 64 exit 64
} }
local snapshot=$2 local snapshot_input=$2 snapshot_dir snapshot
[[ -f $snapshot && ! -L $snapshot ]] || { [[ -f $snapshot_input && ! -L $snapshot_input ]] || {
echo 'snapshot must be a regular non-symlink file' >&2 echo 'snapshot must be a regular non-symlink file' >&2
exit 1 exit 1
} }
snapshot_dir=$(cd "$(dirname "$snapshot_input")" && pwd -P)
snapshot="$snapshot_dir/$(basename "$snapshot_input")"
[[ -z $(git -C "$repository_root" status --short) ]] || { [[ -z $(git -C "$repository_root" status --short) ]] || {
echo 'local acceptance requires a clean source tree so report and image source are reproducible' >&2 echo 'local acceptance requires a clean source tree so report and image source are reproducible' >&2
exit 1 exit 1