From fba183b30b8adcd36cf454e31f4ebf51d29aeef0 Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 17 Mar 2026 07:48:56 +0800 Subject: [PATCH 1/3] Auto detect pnpm global installation path for macOS This closes https://github.com/google-gemini/gemini-cli/issues/18023. On macOS, the path is `$HOME/Library/pnpm/global/5`, which doesn't match the current prediects. --- packages/cli/src/utils/installationInfo.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/utils/installationInfo.ts b/packages/cli/src/utils/installationInfo.ts index 39d77ba640a..14dd7ed41b4 100644 --- a/packages/cli/src/utils/installationInfo.ts +++ b/packages/cli/src/utils/installationInfo.ts @@ -119,7 +119,8 @@ export function getInstallationInfo( // Check for pnpm if ( realPath.includes('/.pnpm/global') || - realPath.includes('/.local/share/pnpm') + realPath.includes('/.local/share/pnpm') || + realPath.includes('/pnpm/global') ) { const updateCommand = 'pnpm add -g @google/gemini-cli@latest'; return { From b069955f98bfe0db23bf605a3efb3127282d9717 Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 17 Mar 2026 07:53:17 +0800 Subject: [PATCH 2/3] Update packages/cli/src/utils/installationInfo.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- packages/cli/src/utils/installationInfo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/utils/installationInfo.ts b/packages/cli/src/utils/installationInfo.ts index 14dd7ed41b4..d018812b907 100644 --- a/packages/cli/src/utils/installationInfo.ts +++ b/packages/cli/src/utils/installationInfo.ts @@ -120,7 +120,7 @@ export function getInstallationInfo( if ( realPath.includes('/.pnpm/global') || realPath.includes('/.local/share/pnpm') || - realPath.includes('/pnpm/global') + realPath.includes('/Library/pnpm/global') ) { const updateCommand = 'pnpm add -g @google/gemini-cli@latest'; return { From 6c89c9990250182688a481c02c91d52a9b255a89 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 26 Mar 2026 16:26:14 +0800 Subject: [PATCH 3/3] Support Windows as well --- packages/cli/src/utils/installationInfo.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/utils/installationInfo.ts b/packages/cli/src/utils/installationInfo.ts index d018812b907..5bfef7c5692 100644 --- a/packages/cli/src/utils/installationInfo.ts +++ b/packages/cli/src/utils/installationInfo.ts @@ -120,7 +120,8 @@ export function getInstallationInfo( if ( realPath.includes('/.pnpm/global') || realPath.includes('/.local/share/pnpm') || - realPath.includes('/Library/pnpm/global') + realPath.includes('/Library/pnpm/global/') || + realPath.includes('/AppData/Local/pnpm/global/') ) { const updateCommand = 'pnpm add -g @google/gemini-cli@latest'; return {