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

Function NewCmdEnable

pkg/cmd/tenant/enable/enable.go:27–47  ·  view source on GitHub ↗
(f factory.Factory)

Source from the content-addressed store, hash-verified

25}
26
27func NewCmdEnable(f factory.Factory) *cobra.Command {
28 cmd := &cobra.Command{
29 Use: "enable {<name> | <id>}",
30 Short: "Enable a tenant",
31 Long: "Enable a tenant in Octopus Deploy",
32 Example: heredoc.Docf(`
33 %[1]s tenant enable Tenants-1
34 %[1]s tenant enable 'Tenant'
35 `, constants.ExecutableName),
36 RunE: func(c *cobra.Command, args []string) error {
37 if len(args) == 0 {
38 args = append(args, "")
39 }
40
41 opts := NewEnableOptions(args, cmd.NewDependencies(f, c))
42 return enableRun(opts)
43 },
44 }
45
46 return cmd
47}
48
49func enableRun(opts *EnableOptions) error {
50 if !opts.NoPrompt {

Callers

nothing calls this directly

Calls 2

enableRunFunction · 0.85
NewEnableOptionsFunction · 0.70

Tested by

no test coverage detected