MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / NewCmdDisable

Function NewCmdDisable

pkg/cmd/project/disable/disable.go:27–44  ·  view source on GitHub ↗
(f factory.Factory)

Source from the content-addressed store, hash-verified

25}
26
27func NewCmdDisable(f factory.Factory) *cobra.Command {
28 cmd := &cobra.Command{
29 Use: "disable",
30 Short: "Disable a project",
31 Long: "Disable a project in Octopus Deploy",
32 Example: heredoc.Docf("%[1]s project disable", constants.ExecutableName),
33 RunE: func(c *cobra.Command, args []string) error {
34 if len(args) == 0 {
35 args = append(args, "")
36 }
37
38 opts := NewDisableOptions(args, cmd.NewDependencies(f, c))
39 return disableRun(opts)
40 },
41 }
42
43 return cmd
44}
45
46func disableRun(opts *DisableOptions) error {
47 if !opts.NoPrompt {

Callers

nothing calls this directly

Calls 2

NewDisableOptionsFunction · 0.70
disableRunFunction · 0.70

Tested by

no test coverage detected