cli
cli copied to clipboard
Specifying `-f json` to `task wait` is ignored
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
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.
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