Spin output can still be piped if timeout occurs (#461)

This commit is contained in:
Rose Thatcher 2023-12-13 12:54:14 -06:00 committed by GitHub
parent 7b16e873c7
commit 4a00db207a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,6 +107,9 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case timeout.TickTimeoutMsg:
if msg.TimeoutValue <= 0 {
// grab current output before closing for piped instances
m.stdout = outbuf.String()
m.status = exit.StatusAborted
return m, tea.Quit
}