From 2d2010fd42708885f0da85835ce368dd1329e844 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Fri, 5 Feb 2021 21:20:17 +0100 Subject: [PATCH] send: fix crash if invalid password is given --- commands/compose/send.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/compose/send.go b/commands/compose/send.go index 2606d5f..f61478f 100644 --- a/commands/compose/send.go +++ b/commands/compose/send.go @@ -113,6 +113,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error { } if err != nil { failCh <- errors.Wrap(err, "send:") + return } var writer io.Writer = sender @@ -132,7 +133,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error { go func() { err = <-failCh if err != nil { - aerc.PushError(err.Error()) + aerc.PushError(strings.ReplaceAll(err.Error(), "\n", " ")) aerc.NewTab(composer, tabName) return }