{
  "version": 3,
  "sources": ["../../../../src/packages/plugin-commands-installation/nodeExecPath.ts"],
  "sourcesContent": ["import { promises as fs } from 'node:fs';\nimport which from 'which';\nimport process from 'node:process';\n\nexport async function getNodeExecPath(): Promise<string> {\n  try {\n    // The system default Node.js executable is preferred\n    // not the one used to run the pnpm CLI.\n    const nodeExecPath = await which('node');\n\n    return fs.realpath(nodeExecPath);\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  } catch (err: any) {\n    if (err['code'] !== 'ENOENT') {\n      throw err;\n    }\n\n    return process.env.NODE ?? process.execPath;\n  }\n}\n"],
  "mappings": "AAAA,SAAS,YAAY,UAAU;AAC/B,OAAO,WAAW;AAClB,OAAO,aAAa;AAEpB,eAAsB,kBAAmC;AACvD,MAAI;AAGF,UAAM,eAAe,MAAM,MAAM,MAAM;AAEvC,WAAO,GAAG,SAAS,YAAY;AAAA,EAEjC,SAAS,KAAU;AACjB,QAAI,IAAI,MAAM,MAAM,UAAU;AAC5B,YAAM;AAAA,IACR;AAEA,WAAO,QAAQ,IAAI,QAAQ,QAAQ;AAAA,EACrC;AACF;",
  "names": []
}
