Exit(1) when more than 1 jail matching provided name
This commit is contained in:
parent
26ceb1630a
commit
7e1c213ff4
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user