Skip to content

Commit

Permalink
fix(pnpm): use .exe
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlindquist committed Oct 12, 2024
1 parent 5264f6f commit 96f1dec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/cli/lib/install.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { kitPnpmPath } from "../../core/resolvers.js"
import { isBin } from "../../core/is.js"
import { existsSync } from "node:fs"
export async function createPackageManagerCommand(
command: "i" | "un",
packageNames: string[]
Expand All @@ -14,16 +14,18 @@ export async function createPackageManagerCommand(
| "uninstall"

if (isYarn) {
if (command == "i") toolCommand = "add"
if (command === "i") {
toolCommand = "add"
}
}

// Add .cmd extension for Windows
if (global.isWin) {
packageManager += ".cmd"
packageManager += ".exe"
}

if (!isYarn) {
if (await isBin(kitPnpmPath(packageManager))) {
if (existsSync(kitPnpmPath(packageManager))) {
packageManager = kitPnpmPath(packageManager)
}
}
Expand Down

0 comments on commit 96f1dec

Please sign in to comment.