eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 572 B
JavaScript
import{existsSync}from"node:fs";import{extname,join}from"node:path";function resolvePnpmInvocation(n){let r=process.env.PNPM_HOME;if(r!==void 0){let t=join(r,process.platform===`win32`?`pnpm.CMD`:`pnpm`);if(existsSync(t))return{args:n,command:t,shell:process.platform===`win32`}}let i=process.env.npm_execpath;if(i!==void 0&&i.toLowerCase().includes(`pnpm`)){let e=extname(i).toLowerCase();return e===`.cjs`||e===`.js`?{args:[i,...n],command:process.execPath}:{args:n,command:i,shell:process.platform===`win32`}}return{args:n,command:`pnpm`}}export{resolvePnpmInvocation};