diff --git a/.changelog/13364.txt b/.changelog/13364.txt new file mode 100644 index 000000000..7a34eda8f --- /dev/null +++ b/.changelog/13364.txt @@ -0,0 +1,3 @@ +```release-note:bug +cli: Fixed a bug where the evaluation ID was not returned from `job revert` when the `-detach` flag was used +`` \ No newline at end of file diff --git a/command/job_revert.go b/command/job_revert.go index 99d7bdd90..6ffde4736 100644 --- a/command/job_revert.go +++ b/command/job_revert.go @@ -164,7 +164,13 @@ func (c *JobRevertCommand) Run(args []string) int { // Nothing to do evalCreated := resp.EvalID != "" - if detach || !evalCreated { + + if !evalCreated { + return 0 + } + + if detach { + c.Ui.Output("Evaluation ID: " + resp.EvalID) return 0 }