From f97e3c8b9edbf9e2182fa56fb8ee78cb70c33972 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. PR-URL: https://github.com/nodejs/node/pull/38983 Reviewed-By: Antoine du Hamel Reviewed-By: Michael Dawson Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aea2b787b18e41..7f8066a22e11c9 100644 --- a/Makefile +++ b/Makefile @@ -350,7 +350,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 := \