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

Function PromptMissing

pkg/cmd/ephemeralenvironment/create/create.go:142–159  ·  view source on GitHub ↗
(opts *CreateOptions)

Source from the content-addressed store, hash-verified

140}
141
142func PromptMissing(opts *CreateOptions) error {
143
144 err := question.AskName(opts.Ask, "", "ephemeral environment", &opts.Name.Value)
145 if err != nil {
146 return err
147 }
148
149 if opts.Project.Value == "" {
150 fmt.Fprintf(opts.Out, " Choose from projects configured with an ephemeral environment channel.\n")
151 project, err := selectors.Select(opts.Ask, "Select a project:", opts.GetConfiguredProjectsCallback, func(project *projects.Project) string { return project.GetName() })
152 if err != nil {
153 return err
154 }
155 opts.Project.Value = project.GetName()
156 }
157
158 return nil
159}

Callers 3

createRunFunction · 0.70

Calls 3

AskNameFunction · 0.92
SelectFunction · 0.92
GetNameMethod · 0.65