(deps commandDeps)
| 688 | } |
| 689 | |
| 690 | func newTaskProfileUpdateCommand(deps commandDeps) *cobra.Command { |
| 691 | var profileRaw string |
| 692 | cmd := &cobra.Command{ |
| 693 | Use: taskUpdateIDValue, |
| 694 | Short: "Replace one task execution profile", |
| 695 | Args: exactOneNonBlankArg(), |
| 696 | RunE: func(cmd *cobra.Command, args []string) error { |
| 697 | client, err := clientFromDeps(deps) |
| 698 | if err != nil { |
| 699 | return err |
| 700 | } |
| 701 | request, err := buildTaskExecutionProfileRequest(args[0], profileRaw) |
| 702 | if err != nil { |
| 703 | return err |
| 704 | } |
| 705 | profile, err := client.SetTaskExecutionProfile(cmd.Context(), args[0], request) |
| 706 | if err != nil { |
| 707 | return err |
| 708 | } |
| 709 | return writeCommandOutput(cmd, taskExecutionProfileBundle(&profile)) |
| 710 | }, |
| 711 | } |
| 712 | cmd.Flags().StringVar(&profileRaw, taskProfileKey, "", "Task execution profile JSON") |
| 713 | mustMarkFlagRequired(cmd, taskProfileKey) |
| 714 | return cmd |
| 715 | } |
| 716 | |
| 717 | func newTaskProfileDeleteCommand(deps commandDeps) *cobra.Command { |
| 718 | return &cobra.Command{ |
no test coverage detected