cmd: add option to get and set policy directly from database (#2765)
This commit is contained in:
parent
2938d03878
commit
2b30a15a68
10 changed files with 365 additions and 126 deletions
|
|
@ -169,7 +169,14 @@ func ErrorOutput(errResult error, override string, outputFormat string) {
|
|||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
fmt.Fprintf(os.Stderr, "%s\n", output(errOutput{errResult.Error()}, override, outputFormat))
|
||||
var errorMessage string
|
||||
if errResult != nil {
|
||||
errorMessage = errResult.Error()
|
||||
} else {
|
||||
errorMessage = override
|
||||
}
|
||||
|
||||
fmt.Fprintf(os.Stderr, "%s\n", output(errOutput{errorMessage}, override, outputFormat))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue