MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / handleGHCheckResult

Method handleGHCheckResult

internal/tui/first_time_setup.go:309–333  ·  view source on GitHub ↗
(msg ghCheckResultMsg)

Source from the content-addressed store, hash-verified

307}
308
309func (f FirstTimeSetup) handleGHCheckResult(msg ghCheckResultMsg) (tea.Model, tea.Cmd) {
310 if msg.err != nil {
311 f.ghErrorMsg = fmt.Sprintf("Error checking gh CLI: %s", msg.err.Error())
312 f.ghErrorSelected = 0
313 f.step = StepGHError
314 return f, nil
315 }
316
317 if !msg.installed {
318 f.ghErrorMsg = "GitHub CLI (gh) is not installed.\nInstall it from: https://cli.github.com"
319 f.ghErrorSelected = 0
320 f.step = StepGHError
321 return f, nil
322 }
323
324 if !msg.authenticated {
325 f.ghErrorMsg = "GitHub CLI (gh) is not authenticated.\nRun: gh auth login"
326 f.ghErrorSelected = 0
327 f.step = StepGHError
328 return f, nil
329 }
330
331 // gh is installed and authenticated - done
332 return f, tea.Quit
333}
334
335func (f FirstTimeSetup) handleGHErrorKeys(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
336 switch msg.String() {

Callers 1

UpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected