fix(coding-agent): detect Windows pnpm global installs closes #3378
This commit is contained in:
@@ -31,18 +31,18 @@ export function detectInstallMethod(): InstallMethod {
|
||||
return "bun-binary";
|
||||
}
|
||||
|
||||
const resolvedPath = `${__dirname}\0${process.execPath || ""}`.toLowerCase();
|
||||
const resolvedPath = `${__dirname}\0${process.execPath || ""}`.toLowerCase().replace(/\\/g, "/");
|
||||
|
||||
if (resolvedPath.includes("/pnpm/") || resolvedPath.includes("/.pnpm/") || resolvedPath.includes("\\pnpm\\")) {
|
||||
if (resolvedPath.includes("/pnpm/") || resolvedPath.includes("/.pnpm/")) {
|
||||
return "pnpm";
|
||||
}
|
||||
if (resolvedPath.includes("/yarn/") || resolvedPath.includes("/.yarn/") || resolvedPath.includes("\\yarn\\")) {
|
||||
if (resolvedPath.includes("/yarn/") || resolvedPath.includes("/.yarn/")) {
|
||||
return "yarn";
|
||||
}
|
||||
if (isBunRuntime) {
|
||||
return "bun";
|
||||
}
|
||||
if (resolvedPath.includes("/npm/") || resolvedPath.includes("/node_modules/") || resolvedPath.includes("\\npm\\")) {
|
||||
if (resolvedPath.includes("/npm/") || resolvedPath.includes("/node_modules/")) {
|
||||
return "npm";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user