Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2022-01-18 13:37:54 +0300
committerMichaël Zasso <targos@protonmail.com>2022-01-18 16:23:37 +0300
commit4958c800da64d9c32e1a9093faabf35e5bc24d79 (patch)
tree08850e245550824cf00f50946ed6dce1cdedfc6d
parent48e4780fd7570ee60c45bde6cf140cddfaffebc2 (diff)
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 PR-URL: https://github.com/nodejs/node/pull/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>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a2ffd0652a6..cc455e39ecb 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)