From 5cedd28733af716948ad3c6d16f724bdd7da5e62 Mon Sep 17 00:00:00 2001 From: "Benjamin G." Date: Wed, 28 Jan 2026 21:31:07 -0600 Subject: [PATCH] Fix detection of bun as package manager (#17462) Co-authored-by: Sehoon Shon --- packages/cli/src/utils/installationInfo.test.ts | 2 +- packages/cli/src/utils/installationInfo.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/utils/installationInfo.test.ts b/packages/cli/src/utils/installationInfo.test.ts index c3a2f2646d..ca1120c0e3 100644 --- a/packages/cli/src/utils/installationInfo.test.ts +++ b/packages/cli/src/utils/installationInfo.test.ts @@ -233,7 +233,7 @@ describe('getInstallationInfo', () => { }); it('should detect global bun installation', () => { - const bunPath = `/Users/test/.bun/bin/gemini`; + const bunPath = `/Users/test/.bun/install/global/node_modules/@google/gemini-cli/dist/index.js`; process.argv[1] = bunPath; mockedRealPathSync.mockReturnValue(bunPath); mockedExecSync.mockImplementation(() => { diff --git a/packages/cli/src/utils/installationInfo.ts b/packages/cli/src/utils/installationInfo.ts index ddc4afe8da..a682cc75e1 100644 --- a/packages/cli/src/utils/installationInfo.ts +++ b/packages/cli/src/utils/installationInfo.ts @@ -142,7 +142,7 @@ export function getInstallationInfo( updateMessage: 'Running via bunx, update not applicable.', }; } - if (realPath.includes('/.bun/bin')) { + if (realPath.includes('/.bun/install/global')) { const updateCommand = 'bun add -g @google/gemini-cli@latest'; return { packageManager: PackageManager.BUN,