return exit code 1 on error

Fixes #132
This commit is contained in:
Nicola Murino
2020-06-20 14:30:46 +02:00
parent 8cb47817f6
commit b80abe6c05
12 changed files with 41 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
package cmd
import (
"os"
"github.com/rs/zerolog"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@@ -44,6 +46,7 @@ Please take a look at the usage below to customize the options.`,
logger.DebugToConsole("Data provider successfully initialized")
} else {
logger.WarnToConsole("Unable to initialize data provider: %v", err)
os.Exit(1)
}
},
}