MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getGhAuthStatus

Function getGhAuthStatus

src/utils/github/ghAuthStatus.ts:17–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

logStartupTelemetryFunction · 0.85
checkLoginStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected