(opts *UpdateOptions)
| 447 | } |
| 448 | |
| 449 | func PromptForEnvironments(opts *UpdateOptions) error { |
| 450 | if len(opts.Environments.Value) == 0 { |
| 451 | selectedEnvironments, err := selectors.EnvironmentsMultiSelect(opts.Ask, opts.GetAllEnvironmentsCallback, "You have not specified an environment. Select a scope or leave empty to update an unscoped variable", false) |
| 452 | if err != nil { |
| 453 | return err |
| 454 | } |
| 455 | |
| 456 | opts.Environments.Value = util.SliceTransform(selectedEnvironments, func(e *environments.Environment) string { return e.ID }) |
| 457 | } |
| 458 | return nil |
| 459 | } |
| 460 | |
| 461 | func PromptForVariableV1(opts *UpdateOptions, tenantVariables *variables.TenantVariables, variableFilter func(opts *UpdateOptions, tenantVariables *variables.TenantVariables) []*PossibleVariable) (*PossibleVariable, error) { |
| 462 | possibleVariables := variableFilter(opts, tenantVariables) |
no test coverage detected