From 451a5e229a268d62c7cc1b897ca060cbdfdec795 Mon Sep 17 00:00:00 2001 From: webxmsj Date: Wed, 9 Nov 2022 15:00:41 +0800 Subject: [PATCH] fix:Fixed the issue that the pkg parameter is not used in getNpmPackageVersion --- lib/shared/runtime-info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shared/runtime-info.js b/lib/shared/runtime-info.js index 56c0898be547..b99ad1038f39 100644 --- a/lib/shared/runtime-info.js +++ b/lib/shared/runtime-info.js @@ -97,7 +97,7 @@ function environment() { */ function getNpmPackageVersion(pkg, { global = false } = {}) { const npmBinArgs = ["bin", "-g"]; - const npmLsArgs = ["ls", "--depth=0", "--json", "eslint"]; + const npmLsArgs = ["ls", "--depth=0", "--json", pkg]; if (global) { npmLsArgs.push("-g");