mrd: only output evalID if found

If the multi-region job is a periodic/dispatch job, stopping them
returns an empty EvalID. This removes some unexpected empty lines.
This commit is contained in:
Mahmood Ali
2020-07-22 16:43:03 -04:00
parent ac769420bc
commit f68ed41453

View File

@@ -195,7 +195,9 @@ func (c *JobStopCommand) Run(args []string) int {
c.Ui.Error(fmt.Sprintf("Error deregistering job in %q: %s", region.Name, err))
return 1
}
c.Ui.Output(evalID)
if evalID != "" {
c.Ui.Output(evalID)
}
}
return 0
}