Skip to content

Commit 79c45be

Browse files
committed
feat: log error for fmt.Fprint
Signed-off-by: Matt Gleich <git@mattglei.ch>
1 parent ccf45e7 commit 79c45be

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/output/animations.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ import (
55
"time"
66

77
"github.com/charmbracelet/ssh"
8+
"go.mattglei.ch/timber"
89
)
910

1011
func TypewriterAnimation(s ssh.Session, speed time.Duration, msg string) {
1112
for _, c := range msg {
12-
fmt.Fprint(s, string(c))
13+
_, err := fmt.Fprint(s, string(c))
14+
if err != nil {
15+
timber.Error(err, "failed to output", c)
16+
}
1317
time.Sleep(speed)
1418
}
1519
}

0 commit comments

Comments
 (0)