cli icon indicating copy to clipboard operation
cli copied to clipboard

Specifying `-f json` to `task wait` is ignored

Open sandermvanvliet-stack opened this issue 1 year ago • 2 comments

The bug

Specifying the -f json option for octopus task wait is ignored

Command to reproduce

C:\Users\joe.blogs> octopus task wait --space Teams -f json ServerTasks-512693
Deploy Enterprise Search release 2024.7.22.1280 to Dev for eastus: Success

Outcome

Basic output is printed.

Versions

cli: 2.3.0

sandermvanvliet-stack avatar Jul 22 '24 19:07 sandermvanvliet-stack

A quick look at the wait.go implementation shows that it straight up printf's: https://github.com/OctopusDeploy/cli/blob/860fb0bc0049fecd1c5c05891325bb645020a686/pkg/cmd/task/wait/wait.go#L102 so it looks like json isn't supported here.

sandermvanvliet-stack avatar Jul 22 '24 19:07 sandermvanvliet-stack

Would be great if in that json result it returned the final state of the task, e.g. success/failure/etc. Along with setting an appropriate exit code.

Related: https://github.com/OctopusDeploy/cli/issues/390

reddogaw avatar Aug 16 '24 00:08 reddogaw