Exit(1) when more than 1 jail matching provided name

This commit is contained in:
yo 2023-09-02 10:07:55 +02:00
parent 26ceb1630a
commit 7e1c213ff4

View File

@ -1,8 +1,9 @@
package cmd package cmd
import ( import (
"errors" "os"
"fmt" "fmt"
"errors"
"reflect" "reflect"
"strconv" "strconv"
"strings" "strings"
@ -20,7 +21,7 @@ func GetJailProperties(args []string) {
jail, err = getJailFromArray(a, []string{""}, gJails) jail, err = getJailFromArray(a, []string{""}, gJails)
if err != nil { if err != nil {
fmt.Printf("Error: %s\n", err.Error()) fmt.Printf("Error: %s\n", err.Error())
return os.Exit(1)
} }
} else { } else {
props = append(props, a) props = append(props, a)