Skip to content

Commit 11531eb

Browse files
committed
fix check_deps: skip docker requirement when SKIP_DOCKER_BUILD=1
Also validate that the pre-built bundle exists before proceeding.
1 parent 49a20ed commit 11531eb

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

docker/local-emulator/qemu/build-image.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ check_deps() {
6060
command -v "$qemu_bin" >/dev/null 2>&1 || missing+=("$qemu_bin")
6161
done
6262

63-
for cmd in qemu-img curl docker gzip; do
63+
for cmd in qemu-img curl gzip; do
6464
command -v "$cmd" >/dev/null 2>&1 || missing+=("$cmd")
6565
done
66+
if [ "${SKIP_DOCKER_BUILD:-0}" != "1" ]; then
67+
command -v docker >/dev/null 2>&1 || missing+=("docker")
68+
fi
6669

6770
if [ "$EMULATOR_BUILD_SNAPSHOT" = "1" ]; then
6871
for cmd in socat zstd; do
@@ -659,6 +662,11 @@ for arch in "${TARGET_ARCHS[@]}"; do
659662
download_cloud_image "$arch" "$local_base"
660663
if [ "${SKIP_DOCKER_BUILD:-0}" = "1" ]; then
661664
log "SKIP_DOCKER_BUILD=1: reusing pre-built Docker bundle"
665+
local expected_bundle="$IMAGE_DIR/emulator-${arch}-docker-images.tar.gz"
666+
if [ ! -f "$expected_bundle" ]; then
667+
err "Pre-built bundle not found: $expected_bundle"
668+
exit 1
669+
fi
662670
else
663671
build_local_emulator_image "$arch"
664672
prepare_bundle_artifacts "$arch"

0 commit comments

Comments
 (0)