diff --git a/packages/safe-chain/src/installLocation.js b/packages/safe-chain/src/installLocation.js index efe687a..52125be 100644 --- a/packages/safe-chain/src/installLocation.js +++ b/packages/safe-chain/src/installLocation.js @@ -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; } diff --git a/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh b/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh index 4235276..ebc10c4 100644 --- a/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh +++ b/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh @@ -5,7 +5,7 @@ _get_safe_chain_script_path() { fi if [ -n "${ZSH_VERSION:-}" ]; then - eval 'printf "%s\n" "${(%):-%N}"' + eval 'printf "%s\n" "${(%):-%x}"' return fi