From 72dbfbc0c45d2b9d19b21c6a5a6b4ca71403ffbf Mon Sep 17 00:00:00 2001 From: webxmsj <40289489+webxmsj@users.noreply.github.com> Date: Wed, 9 Nov 2022 16:40:53 +0800 Subject: [PATCH] chore: use `pkg` parameter in `getNpmPackageVersion` (#16525) --- 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 56c0898be54..b99ad1038f3 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");