From f2a7785700791a38059d4b3457ec1158150fc858 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Aug 2026 06:40:37 +0000 Subject: [PATCH] =?UTF-8?q?fix(build):=20set=20-e=20safe=20VLLM2=20mirror?= =?UTF-8?q?=20=E2=80=94=20[[=20]]=20&&=20without=20||=20true=20kills=20scr?= =?UTF-8?q?ipt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two patterns broke Docker build under set -euo pipefail: 1. for loop: [[ -d candidate ]] && { VLLM2=x; break; } → if no match, exit 1 2. block overrides: [[ -f file ]] && { mkdir; cp; } → if file missing, exit 1 Fix: replace && { } with if/then/fi for both patterns. --- qwen3_6_scripts/patch_ops.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qwen3_6_scripts/patch_ops.sh b/qwen3_6_scripts/patch_ops.sh index caa06577..7e00eef0 100755 --- a/qwen3_6_scripts/patch_ops.sh +++ b/qwen3_6_scripts/patch_ops.sh @@ -116,7 +116,10 @@ for _candidate in \ /usr/local/corex/lib/python3/dist-packages/vllm \ /usr/local/corex/lib64/python3/dist-packages/vllm \ /usr/local/lib/python3.10/site-packages/vllm; do - [[ -d "$_candidate" && "$_candidate" != "$VLLM_ROOT" ]] && { VLLM2="$_candidate"; break; } + if [[ -d "$_candidate" && "$_candidate" != "$VLLM_ROOT" ]]; then + VLLM2="$_candidate" + break + fi done if [[ -n "$VLLM2" ]]; then echo "VLLM2=${VLLM2} (will mirror all patches)" @@ -308,10 +311,10 @@ if [[ -n "$VLLM2" ]]; then core/block/prefix_caching_block.py core/block/block_table.py \ model_executor/sampling_metadata.py model_executor/layers/sampler.py \ sampling_params.py; do - [[ -f "${VLLM_ROOT}/${f}" ]] && { + if [[ -f "${VLLM_ROOT}/${f}" ]]; then mkdir -p "$(dirname "${VLLM2}/${f}")" cp "${VLLM_ROOT}/${f}" "${VLLM2}/${f}" 2>/dev/null || true - } + fi done echo "[ok] mirrored all patches to VLLM2" fi