From 7e1c213ff4e93f489be9fa26e6c847731c6f5116 Mon Sep 17 00:00:00 2001 From: yo Date: Sat, 2 Sep 2023 10:07:55 +0200 Subject: [PATCH] Exit(1) when more than 1 jail matching provided name --- cmd/properties.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/properties.go b/cmd/properties.go index 6b03048..472a9e3 100644 --- a/cmd/properties.go +++ b/cmd/properties.go @@ -1,8 +1,9 @@ package cmd import ( - "errors" + "os" "fmt" + "errors" "reflect" "strconv" "strings" @@ -20,7 +21,7 @@ func GetJailProperties(args []string) { jail, err = getJailFromArray(a, []string{""}, gJails) if err != nil { fmt.Printf("Error: %s\n", err.Error()) - return + os.Exit(1) } } else { props = append(props, a)