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

Function PromptMissing

pkg/cmd/tenant/clone/clone.go:114–136  ·  view source on GitHub ↗
(opts *CloneOptions)

Source from the content-addressed store, hash-verified

112}
113
114func PromptMissing(opts *CloneOptions) error {
115 err := question.AskName(opts.Ask, "", "Tenant", &opts.Name.Value)
116 if err != nil {
117 return err
118 }
119 err = question.AskDescription(opts.Ask, "", "Tenant", &opts.Description.Value)
120 if err != nil {
121 return err
122 }
123
124 if opts.SourceTenant.Value == "" {
125 tenant, err := selectors.Select(opts.Ask, "You have not specified a source Tenant to clone from. Please select one:", opts.GetAllTenantsCallback, func(tenant *tenants.Tenant) string {
126 return tenant.Name
127 })
128 if err != nil {
129 return err
130 }
131
132 opts.SourceTenant.Value = tenant.Name
133 }
134
135 return nil
136}

Callers 3

cloneRunFunction · 0.70

Calls 3

AskNameFunction · 0.92
AskDescriptionFunction · 0.92
SelectFunction · 0.92