From d8fec54e817e74f2de533e511cfd31ae93f58963 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Mon, 11 Aug 2025 21:32:23 -0400 Subject: feat(/setup-github): Use node to download the files (#5863) --- packages/cli/src/utils/gitUtils.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'packages/cli/src/utils/gitUtils.ts') diff --git a/packages/cli/src/utils/gitUtils.ts b/packages/cli/src/utils/gitUtils.ts index f5f9cb92..7b271ac4 100644 --- a/packages/cli/src/utils/gitUtils.ts +++ b/packages/cli/src/utils/gitUtils.ts @@ -5,7 +5,7 @@ */ import { execSync } from 'child_process'; -import { ProxyAgent, setGlobalDispatcher } from 'undici'; +import { ProxyAgent } from 'undici'; /** * Checks if a directory is within a git repository hosted on GitHub. @@ -57,9 +57,6 @@ export const getLatestGitHubRelease = async ( ): Promise => { try { const controller = new AbortController(); - if (proxy) { - setGlobalDispatcher(new ProxyAgent(proxy)); - } const endpoint = `https://api.github.com/repos/google-github-actions/run-gemini-cli/releases/latest`; @@ -70,8 +67,9 @@ export const getLatestGitHubRelease = async ( 'Content-Type': 'application/json', 'X-GitHub-Api-Version': '2022-11-28', }, - signal: controller.signal, - }); + dispatcher: proxy ? new ProxyAgent(proxy) : undefined, + signal: AbortSignal.any([AbortSignal.timeout(30_000), controller.signal]), + } as RequestInit); if (!response.ok) { throw new Error( -- cgit v1.2.3