mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
bad boolean logic for List-on-Info commands
This commit is contained in:
@@ -115,7 +115,7 @@ func (c *AllocStatusCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
// If args not specified but output format is specified, format and output the allocations data list
|
||||
if len(args) == 0 && json || len(tmpl) > 0 {
|
||||
if len(args) == 0 && (json || len(tmpl) > 0) {
|
||||
allocs, _, err := client.Allocations().List(nil)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error querying allocations: %v", err))
|
||||
|
||||
@@ -106,7 +106,7 @@ func (c *EvalStatusCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
// If args not specified but output format is specified, format and output the evaluations data list
|
||||
if len(args) == 0 && json || len(tmpl) > 0 {
|
||||
if len(args) == 0 && (json || len(tmpl) > 0) {
|
||||
evals, _, err := client.Evaluations().List(nil)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error querying evaluations: %v", err))
|
||||
|
||||
@@ -94,7 +94,7 @@ func (c *JobInspectCommand) Run(args []string) int {
|
||||
}
|
||||
|
||||
// If args not specified but output format is specified, format and output the jobs data list
|
||||
if len(args) == 0 && json || len(tmpl) > 0 {
|
||||
if len(args) == 0 && (json || len(tmpl) > 0) {
|
||||
jobs, _, err := client.Jobs().List(nil)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error querying jobs: %v", err))
|
||||
|
||||
Reference in New Issue
Block a user