fix: add windowsHide to child_process calls to prevent terminal popup on Windows (#637)

- copilot-models.ts: add windowsHide to `gh auth token` call
- file-provider.ts: add shared execOpts with windowsHide for all
  docker/ssh/singularity calls

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-05-11 23:00:09 +08:00
committed by GitHub
parent e6a0f5b6f2
commit f78fb2da90
2 changed files with 2 additions and 1 deletions
@@ -125,7 +125,7 @@ export async function resolveCopilotOAuthTokenWithSource(
const appsToken = await readGhAppsToken()
if (appsToken) return { token: appsToken, source: 'apps-json' }
try {
const { stdout } = await execFileAsync('gh', ['auth', 'token'], { timeout: 3000 })
const { stdout } = await execFileAsync('gh', ['auth', 'token'], { timeout: 3000, windowsHide: true })
const v = stdout.trim()
if (isUsableOAuthToken(v)) return { token: v, source: 'gh-cli' }
} catch { /* ignore */ }