diff options
author | Reto Brunner <reto@labrat.space> | 2021-02-05 21:20:17 +0100 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2021-02-05 21:20:17 +0100 |
commit | 2d2010fd42708885f0da85835ce368dd1329e844 (patch) | |
tree | 070c7e5d6f68250429063e1c6f38090a4d8a3611 /commands | |
parent | 8ea86cea41aa038a25a8fee9cd540a7336869dae (diff) | |
download | aerc-2d2010fd42708885f0da85835ce368dd1329e844.tar.gz |
send: fix crash if invalid password is given
Diffstat (limited to 'commands')
-rw-r--r-- | commands/compose/send.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go index 2606d5f4..f61478f1 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 } |