Skip to content

Commit 6faa96f

Browse files
committed
Fix pnpm being detected as npm
1 parent 84492ec commit 6faa96f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PackageManagers.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ let getPackageManagerInfo = async () =>
3535
let filename = Path.parse(execPath).name->String.toLowerCase
3636

3737
let packageManager = switch () {
38-
| _ if filename->String.includes("npm") => Some(Npm)
3938
| _ if filename->String.includes("yarn") =>
4039
let versionResult = await Promisified.ChildProcess.exec(`${command} --version`)
4140
let version = versionResult.stdout->String.trim
4241
let isYarn1 = CompareVersions.compareVersions(version, "2.0.0")->Ordering.isLess
4342

4443
Some(isYarn1 ? Yarn1 : YarnBerry)
4544
| _ if filename->String.includes("pnpm") => Some(Pnpm)
45+
| _ if filename->String.includes("npm") => Some(Npm) // make sure this goes after pnpm ...
4646
| _ if filename->String.includes("bun") => Some(Bun)
4747
| _ => None
4848
}

0 commit comments

Comments
 (0)