Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/orb init warning #938

Merged
merged 3 commits into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion cmd/orb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,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
}
}

fullyAutomated := 0
prompt := &survey.Select{
Expand Down