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

Function PromptMissing

pkg/cmd/tenant/enable/enable.go:74–88  ·  view source on GitHub ↗
(opts *EnableOptions)

Source from the content-addressed store, hash-verified

72}
73
74func PromptMissing(opts *EnableOptions) error {
75 if opts.IdOrName == "" {
76 existingTenants, err := opts.Client.Tenants.GetAll()
77 if err != nil {
78 return err
79 }
80 selectedTenant, err := selectors.ByName(opts.Ask, existingTenants, "Select the tenant you wish to enable:")
81 if err != nil {
82 return err
83 }
84 opts.IdOrName = selectedTenant.GetID()
85 }
86
87 return nil
88}

Callers 1

enableRunFunction · 0.70

Calls 1

ByNameFunction · 0.92

Tested by

no test coverage detected