mirror of
https://git.sr.ht/~sircmpwn/aerc
synced 2024-11-23 16:42:07 +01:00
Handle no configured accounts gracefully
Instead of throwing a runtime error, when no accounts are configured in accounts.conf, we provide an informative error message.
This commit is contained in:
parent
78db7ccafa
commit
45b4c8a724
@ -93,6 +93,10 @@ func loadAccountConfig(path string) ([]AccountConfig, error) {
|
||||
}
|
||||
accounts = append(accounts, account)
|
||||
}
|
||||
if len(accounts) == 0 {
|
||||
err = errors.New("No accounts configured in accounts.conf")
|
||||
return nil, err
|
||||
}
|
||||
return accounts, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user