MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getGhAuthStatus

Function getGhAuthStatus

source code/utils/github/ghAuthStatus.ts:19–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 * stdout: 'ignore' so the token never enters this process.
18 */
19export async function getGhAuthStatus(): Promise<GhAuthStatus> {
20 const ghPath = await which('gh')
21 if (!ghPath) {
22 return 'not_installed'
23 }
24 const { exitCode } = await execa('gh', ['auth', 'token'], {
25 stdout: 'ignore',
26 stderr: 'ignore',
27 timeout: 5000,
28 reject: false,
29 })
30 return exitCode === 0 ? 'authenticated' : 'not_authenticated'
31}

Callers 2

logStartupTelemetryFunction · 0.85
checkLoginStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected