Return evalID if `-detach` flag is passed to job revert (#13364)

* Return evalID if `-detach` flag is passed to job revert
This commit is contained in:
Joseph Martin 2022-06-15 12:20:29 -06:00 committed by GitHub
parent a5045b3f0f
commit 4aa96d5bfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

3
.changelog/13364.txt Normal file
View File

@ -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
``

View File

@ -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
}