Skip to content

Commit 4958c80

Browse files
committed
build: fix npm version detection
Npm's package.json now contains two fields named "version". Grep for the top-level one. Fixes: nodejs/build#2850 PR-URL: #41575 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Zijian Liu <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 48e4780 commit 4958c80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
830830
ifeq ($(findstring os/390,$PLATFORM),os/390)
831831
PLATFORM ?= os390
832832
endif
833-
NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/')
833+
NPMVERSION=v$(shell cat deps/npm/package.json | grep '^ "version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/')
834834

835835
UNAME_M=$(shell uname -m)
836836
ifeq ($(findstring x86_64,$(UNAME_M)),x86_64)

0 commit comments

Comments
 (0)