Skip to content

Commit

Permalink
print message when skipping wait
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Aug 19, 2024
1 parent c6681f4 commit 7fe0904
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/state/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ func (c *state) WaitForActions(cmd *cobra.Command, ctx context.Context, actions
return err
}
if !wait {
for _, action := range actions {
ui.SkipActionWaitMessage(action)
}
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions internal/ui/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ func ActionMessage(action *hcloud.Action) string {
return fmt.Sprintf("Waiting for %s", color.New(color.Bold).Sprint(action.Command))
}

func SkipActionWaitMessage(action *hcloud.Action) string {
return fmt.Sprintf("Skipping waiting for %s", color.New(color.Bold).Sprint(action.Command))
}

// FakeActionMessage returns the initial value with a unused color to grow the string
// size.
//
Expand Down

0 comments on commit 7fe0904

Please sign in to comment.