Fix detection of bun as package manager (#17462)

Co-authored-by: Sehoon Shon <sshon@google.com>
This commit is contained in:
Benjamin G.
2026-01-28 21:31:07 -06:00
committed by GitHub
parent ba3e1ed1c7
commit 5cedd28733
2 changed files with 2 additions and 2 deletions

View File

@@ -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(() => {

View File

@@ -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,