fix: detect pnpm/pnpx in ~/.local (#15254)

Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
This commit is contained in:
rwa
2026-01-25 20:13:43 +01:00
committed by GitHub
parent 4d197c992d
commit c0b8c4ab9e

View File

@@ -69,7 +69,10 @@ export function getInstallationInfo(
updateMessage: 'Running via npx, update not applicable.',
};
}
if (realPath.includes('/.pnpm/_pnpx')) {
if (
realPath.includes('/.pnpm/_pnpx') ||
realPath.includes('/.cache/pnpm/dlx')
) {
return {
packageManager: PackageManager.PNPX,
isGlobal: false,
@@ -103,7 +106,10 @@ export function getInstallationInfo(
}
// Check for pnpm
if (realPath.includes('/.pnpm/global')) {
if (
realPath.includes('/.pnpm/global') ||
realPath.includes('/.local/share/pnpm')
) {
const updateCommand = 'pnpm add -g @google/gemini-cli@latest';
return {
packageManager: PackageManager.PNPM,