Merge pull request #11879 from cli/kw/fix-progress-indicator-for-create-follow

`gh agent-task create`: Fix `--follow` not killing the progress indicator
This commit is contained in:
Babak K. Shandiz 2025-10-08 10:55:53 +02:00 committed by GitHub
commit c8152ed44e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -166,6 +166,8 @@ func createRun(opts *CreateOptions) error {
}
if opts.Follow {
opts.IO.StopProgressIndicator()
fmt.Fprintf(opts.IO.Out, "Displaying session logs for job %s. Press Ctrl+C to stop.\n", job.ID)
return followLogs(opts, client, job.SessionID)
}

View file

@ -488,6 +488,7 @@ func Test_createRun(t *testing.T) {
}
},
wantStdout: heredoc.Doc(`
Displaying session logs for job job123. Press Ctrl+C to stop.
(rendered:) <raw-logs-one>
(rendered:) <raw-logs-two>
`),