From a8f0feebf2fcaf8e438b6897ad16eefd667c7f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 18 Jan 2022 11:37:54 +0100 Subject: [PATCH] build: fix npm version detection Npm's package.json now contains two fields named "version". Grep for the top-level one. Fixes: https://github.com/nodejs/build/issues/2850 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a2ffd0652a6696..cc455e39ecbdb5 100644 --- a/Makefile +++ b/Makefile @@ -830,7 +830,7 @@ PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]') ifeq ($(findstring os/390,$PLATFORM),os/390) PLATFORM ?= os390 endif -NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/') +NPMVERSION=v$(shell cat deps/npm/package.json | grep '^ "version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/') UNAME_M=$(shell uname -m) ifeq ($(findstring x86_64,$(UNAME_M)),x86_64)