Some fixes

This commit is contained in:
Reinier Criel 2026-04-13 13:32:55 -07:00
parent f7324ccfc0
commit 38a8130f4a
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,8 @@
import path from "path";
/** @type {NodeJS.Process & { pkg?: unknown }} */
const processWithPkg = process;
/**
* @param {string} executablePath
* @returns {string | undefined}
@ -28,7 +31,7 @@ export function deriveInstallDirFromExecutablePath(executablePath) {
* @returns {string | undefined}
*/
export function getInstalledSafeChainDir(options = {}) {
const isPackaged = options.isPackaged ?? Boolean(process.pkg);
const isPackaged = options.isPackaged ?? Boolean(processWithPkg.pkg);
if (!isPackaged) {
return undefined;
}