Skip to content

Commit

Permalink
Merge pull request #938 from CircleCI-Public/docs/orb-init-warning
Browse files Browse the repository at this point in the history
Docs/orb init warning
  • Loading branch information
JulesFaucherre authored May 16, 2023
2 parents 70ca79d + 0ef4187 commit fbb0d7c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion cmd/orb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,22 @@ func inlineIncludes(node *yaml.Node, orbRoot string) error {
func initOrb(opts orbOptions) error {
orbPath := opts.args[0]
var err error
fmt.Println("Note: This command is in preview. Please report any bugs! https://github.com/CircleCI-Public/circleci-cli/issues/new/choose")

if !opts.private {
prompt := &survey.Select{
Message: "Would you like to create a public or private orb?",
Options: []string{"Public", "Private"},
}
var selectedOption string
err := survey.AskOne(prompt, &selectedOption)
if err != nil {
return errors.Wrap(err, "Unexpected error")
}

if selectedOption == "Private" {
opts.private = true
}
}

orbInformThatOrbCannotBeDeletedMessage()

Expand Down

0 comments on commit fbb0d7c

Please sign in to comment.