(deps commandDeps)
| 636 | } |
| 637 | |
| 638 | func newTaskDeleteCommand(deps commandDeps) *cobra.Command { |
| 639 | cmd := &cobra.Command{ |
| 640 | Use: taskDeleteIDValue, |
| 641 | Short: "Delete a task", |
| 642 | Args: exactOneNonBlankArg(), |
| 643 | RunE: func(cmd *cobra.Command, args []string) error { |
| 644 | client, err := clientFromDeps(deps) |
| 645 | if err != nil { |
| 646 | return err |
| 647 | } |
| 648 | if err := client.DeleteTask(cmd.Context(), args[0]); err != nil { |
| 649 | return err |
| 650 | } |
| 651 | return writeCommandOutput(cmd, taskDeleteBundle(args[0])) |
| 652 | }, |
| 653 | } |
| 654 | return cmd |
| 655 | } |
| 656 | |
| 657 | func newTaskProfileCommand(deps commandDeps) *cobra.Command { |
| 658 | cmd := &cobra.Command{ |
no test coverage detected