diff options
author | Rose Thatcher <97619538+hopefulTex@users.noreply.github.com> | 2023-12-13 12:54:14 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 13:54:14 -0500 |
commit | 4a00db207abe4a3e534d3a32ab885cebe1e0cc31 (patch) | |
tree | 3c131dec146bcd74a4ce4f4abf1c7d545270fbf8 | |
parent | 7b16e873c7c0169d3a7a6fa96a72d39f78dfa7d1 (diff) |
Spin output can still be piped if timeout occurs (#461)
-rw-r--r-- | spin/spin.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spin/spin.go b/spin/spin.go index e68e35c..fe4294d 100644 --- a/spin/spin.go +++ b/spin/spin.go @@ -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 } |