From 1cb4954dc1ff3dcfa6c58b0377cec0692038e4fa Mon Sep 17 00:00:00 2001 From: chinesepowered Date: Tue, 7 Apr 2026 08:52:20 -0700 Subject: [PATCH] fix(sandbox): fall back to 'latest' tag when image name has no colon If the sandbox image name has no explicit :tag and QWEN_SANDBOX_IMAGE_TAG is unset, imageName.split(':')[1] returns undefined, producing a bogus build target like 'myimage:undefined'. Fall back to 'latest' to match Docker's conventional default. --- scripts/build_sandbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_sandbox.js b/scripts/build_sandbox.js index 55e8a79bbc..69b06cb351 100644 --- a/scripts/build_sandbox.js +++ b/scripts/build_sandbox.js @@ -135,7 +135,7 @@ function buildImage(imageName, dockerfile) { ).version; const imageTag = - process.env.QWEN_SANDBOX_IMAGE_TAG || imageName.split(':')[1]; + process.env.QWEN_SANDBOX_IMAGE_TAG || imageName.split(':')[1] || 'latest'; const finalImageName = `${imageName.split(':')[0]}:${imageTag}`; try {