diff --git a/scripts/dispatch-preflight.sh b/scripts/dispatch-preflight.sh index 02b86b3..fe08bd8 100755 --- a/scripts/dispatch-preflight.sh +++ b/scripts/dispatch-preflight.sh @@ -74,7 +74,10 @@ echo "[3/4] sandbox space 存在 + 可写" SPACE_DIR="/tmp/xstudio-sandbox/$WS_HASH/space" if [ ! -d "$SPACE_DIR" ] || [ "$FORCE" = "true" ]; then echo " ⚠️ space 不存在(或 --force),调 prep-sandbox-space.sh" - if ! bash "$SELF_DIR/prep-sandbox-space.sh" "$WS_HASH" $FORCE; then + # prep-sandbox-space.sh expects literal "--force" arg, not "true"(dispatch-session-v2 §2.5 bug) + FORCE_FLAG="" + [ "$FORCE" = "true" ] && FORCE_FLAG="--force" + if ! bash "$SELF_DIR/prep-sandbox-space.sh" "$WS_HASH" $FORCE_FLAG; then exit 4 fi fi