Skip to content

Commit 5c1dc5f

Browse files
targosdanielleadams
authored andcommitted
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 <duhamelantoine1995@gmail.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 1db154f commit 5c1dc5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
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)