From a8ce22ade79c50be9a4d6641346d010811614e83 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Thu, 7 Nov 2019 08:21:21 +0100 Subject: [PATCH] Fail the authelia-scripts commands when bad args are provided. --- cmd/authelia-scripts/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/authelia-scripts/main.go b/cmd/authelia-scripts/main.go index cc475ce9..5f07dde2 100755 --- a/cmd/authelia-scripts/main.go +++ b/cmd/authelia-scripts/main.go @@ -3,6 +3,8 @@ package main import ( + "log" + "github.com/spf13/cobra" ) @@ -117,5 +119,9 @@ func main() { cobraCommands = append(cobraCommands, command) } rootCmd.AddCommand(cobraCommands...) - rootCmd.Execute() + err := rootCmd.Execute() + + if err != nil { + log.Fatal(err) + } }