@eightshone/sshman
Version:
A simple cli ssh manager
18 lines (13 loc) • 358 B
text/typescript
import { execSync } from "child_process";
function detectGlobalPackageManager(): "npm" | "yarn" | "pnpm" {
try {
execSync("pnpm --version", { stdio: "ignore" });
return "pnpm";
} catch {}
try {
execSync("yarn --version", { stdio: "ignore" });
return "yarn";
} catch {}
return "npm";
}
export default detectGlobalPackageManager;