Config loading error was checked too late
MODIFY
app/app.go
app/app.go
@@ -39,14 +39,14 @@ func RunWithAccount(account string) {
runNext := make(chan bool, 1)
configuration, configLoadError := config.LoadConfig()
- if strings.TrimSpace(account) != "" {
- configuration.Token = configuration.GetAccountToken(account)
- }
-
if configLoadError != nil {
log.Fatalf("Error loading configuration file (%s).\n", configLoadError.Error())
}
+ if strings.TrimSpace(account) != "" {
+ configuration.Token = configuration.GetAccountToken(account)
+ }
+
updateAvailableChannel := make(chan bool, 1)
if configuration.ShowUpdateNotifications {
go func() {

Config loading error was checked too late