Use defer instead
This commit is contained in:
parent
359b4a1d63
commit
de7c40789e
1 changed files with 2 additions and 1 deletions
|
|
@ -119,6 +119,8 @@ func listRun(opts *ListOptions) error {
|
|||
}
|
||||
|
||||
opts.IO.StartProgressIndicator()
|
||||
defer opts.IO.StopProgressIndicator()
|
||||
|
||||
if opts.WorkflowSelector != "" {
|
||||
// initially the workflow state is limited to 'active'
|
||||
states := []workflowShared.WorkflowState{workflowShared.Active}
|
||||
|
|
@ -131,7 +133,6 @@ func listRun(opts *ListOptions) error {
|
|||
filters.WorkflowID = workflow.ID
|
||||
filters.WorkflowName = workflow.Name
|
||||
} else {
|
||||
opts.IO.StopProgressIndicator()
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue