From 79977abdf79d32071943104d3720de06b892a2fa Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Thu, 16 Apr 2026 12:45:46 -0400 Subject: [PATCH] fix: Prevent installer from crashing on Emacs warnings and verify tangle --- scripts/onboard-baremetal.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/onboard-baremetal.sh b/scripts/onboard-baremetal.sh index cd9c1cd..3092ef0 100755 --- a/scripts/onboard-baremetal.sh +++ b/scripts/onboard-baremetal.sh @@ -47,7 +47,13 @@ fi # 3. Literate Tangling echo -e "${BLUE}Tangling Literate Org files into source code...${NC}" -emacs --batch --eval "(require 'org)" --eval "(mapc 'org-babel-tangle-file (file-expand-wildcards \"literate/*.org\"))" +# Use || true because Emacs might return non-zero on warnings, but we only care if src/ actually gets populated +emacs --batch --eval "(require 'org)" --eval "(mapc 'org-babel-tangle-file (file-expand-wildcards \"literate/*.org\"))" || echo -e "${YELLOW}! Emacs finished with warnings.${NC}" + +if [ ! -f "src/package.lisp" ]; then + echo -e "${RED}✗ Tangling failed. Source files not generated.${NC}" + exit 1 +fi echo -e "${GREEN}✓ Core tangled.${NC}" # 4. Environment Configuration