(f factory.Factory)
| 25 | } |
| 26 | |
| 27 | func NewCmdEnable(f factory.Factory) *cobra.Command { |
| 28 | cmd := &cobra.Command{ |
| 29 | Use: "enable", |
| 30 | Short: "Enable a project", |
| 31 | Long: "Enable a project in Octopus Deploy", |
| 32 | Example: heredoc.Docf("%[1]s project enable", constants.ExecutableName), |
| 33 | RunE: func(c *cobra.Command, args []string) error { |
| 34 | if len(args) == 0 { |
| 35 | args = append(args, "") |
| 36 | } |
| 37 | |
| 38 | opts := NewEnableOptions(args, cmd.NewDependencies(f, c)) |
| 39 | return disableRun(opts) |
| 40 | }, |
| 41 | } |
| 42 | |
| 43 | return cmd |
| 44 | } |
| 45 | |
| 46 | func disableRun(opts *EnableOptions) error { |
| 47 | if !opts.NoPrompt { |
nothing calls this directly
no test coverage detected