From c35cc9aea7cc6f3575b7c25fa32f444ff58485a7 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Wed, 9 Jun 2021 11:27:25 -0400 Subject: [PATCH] build: make build-addons errors fail the build The `build-addons` makefile target runs `tools/doc/addon-verify.js` and then uses `touch` to update a timestamp file. Unconditionally calling `touch` was losing the exit code from `tools/doc/addon-verify.js` so any errors produced by that script were not failing the build. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 688cb85e774b14..97c9562a559115 100644 --- a/Makefile +++ b/Makefile @@ -352,7 +352,7 @@ test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules else \ $(RM) -r test/addons/??_*/; \ [ -x $(NODE) ] && $(NODE) $< || node $< ; \ - touch $@; \ + [ $$? -eq 0 ] && touch $@; \ fi ADDONS_BINDING_GYPS := \