Skip to content

Commit

Permalink
chore: display error message if not configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Vernin <[email protected]>
  • Loading branch information
olblak committed Jan 7, 2024
1 parent 4528a68 commit b40640f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ var (

rootCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {

if configFile == "" {
fmt.Println("missing configuration file")
os.Exit(2)
}

config.ConfigFile = configFile
err := e.Init()
if err != nil {
Expand Down

0 comments on commit b40640f

Please sign in to comment.