From edd3db28fc8b2fe589584835cd49f0e0202de619 Mon Sep 17 00:00:00 2001 From: steven-studio Date: Mon, 29 Sep 2025 15:23:50 +0800 Subject: [PATCH] Fix bootstrap verification shell error The bootstrap target was failing with '/bin/sh: @env: not found' because the original implementation used complex shell conditionals that could cause @ to be interpreted as a shell command. Changes: - Replace 'diff -q' with 'cmp -s' for reliable binary comparison - Restructure conditional to test for success rather than failure - Use plain echo for messages to avoid macro expansion issues - Add explicit success/error messages for clarity --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 98f28818..9e152f26 100644 --- a/Makefile +++ b/Makefile @@ -152,8 +152,11 @@ $(OUT)/$(STAGE2): $(OUT)/$(STAGE1) bootstrap: $(OUT)/$(STAGE2) $(Q)chmod 775 $(OUT)/$(STAGE2) - $(Q)if ! diff -q $(OUT)/$(STAGE1) $(OUT)/$(STAGE2); then \ - echo "Unable to bootstrap. Aborting"; false; \ + $(Q)if cmp -s $(OUT)/$(STAGE1) $(OUT)/$(STAGE2); then \ + echo "Bootstrap successful: Stage 1 and Stage 2 are identical"; \ + else \ + echo "ERROR: Bootstrap failed - Stage 1 and Stage 2 differ"; \ + exit 1; \ fi $(BUILD_SESSION):