diff --git a/cmd/orb.go b/cmd/orb.go index bb7fc910a..bbd81858e 100644 --- a/cmd/orb.go +++ b/cmd/orb.go @@ -871,6 +871,16 @@ If you change your mind about the name, you will have to create a new orb with t `, namespace, orbName) } + if opts.private { + fmt.Printf(`This orb will not be listed on the registry and is usable only by org users. + +`) + } else { + fmt.Printf(`Please note that any versions you publish of this orb will be world readable unless you create it with the '--private' flag + +`) + } + confirm := fmt.Sprintf("Are you sure you wish to create the orb: `%s/%s`", namespace, orbName) if opts.noPrompt || opts.tty.askUserToConfirm(confirm) { @@ -880,13 +890,7 @@ If you change your mind about the name, you will have to create a new orb with t return err } - confirmationString := "Please note that any versions you publish of this orb are world-readable." - if opts.private { - confirmationString = "This orb will not be listed on the registry and is usable only by org users." - } - fmt.Printf("Orb `%s` created.\n", opts.args[0]) - fmt.Println(confirmationString) fmt.Printf("You can now register versions of `%s` using `circleci orb publish`.\n", opts.args[0]) } diff --git a/cmd/orb_test.go b/cmd/orb_test.go index 3a2f60dc4..e5a5f42b3 100644 --- a/cmd/orb_test.go +++ b/cmd/orb_test.go @@ -1167,8 +1167,9 @@ See a full explanation and documentation on orbs here: https://circleci.com/docs Eventually(session).Should(gexec.Exit(0)) stdout := session.Wait().Out.Contents() - Expect(string(stdout)).To(ContainSubstring(fmt.Sprintf(`Orb %s created. -Please note that any versions you publish of this orb are world-readable. + Expect(string(stdout)).To(ContainSubstring(fmt.Sprintf(`Please note that any versions you publish of this orb will be world readable unless you create it with the '--private' flag + +Orb %s created. You can now register versions of %s using %s`, "`bar-ns/foo-orb`", "`bar-ns/foo-orb`", "`circleci orb publish`"))) }) @@ -1232,8 +1233,9 @@ You can now register versions of %s using %s`, "`bar-ns/foo-orb`", "`bar-ns/foo- Eventually(session).Should(gexec.Exit(0)) stdout := session.Wait().Out.Contents() - Expect(string(stdout)).To(ContainSubstring(fmt.Sprintf(`Orb %s created. -This orb will not be listed on the registry and is usable only by org users. + Expect(string(stdout)).To(ContainSubstring(fmt.Sprintf(`This orb will not be listed on the registry and is usable only by org users. + +Orb %s created. You can now register versions of %s using %s`, "`bar-ns/foo-orb`", "`bar-ns/foo-orb`", "`circleci orb publish`"))) }) @@ -1365,9 +1367,10 @@ You will not be able to change the name of this orb. If you change your mind about the name, you will have to create a new orb with the new name. +Please note that any versions you publish of this orb will be world readable unless you create it with the '--private' flag + Are you sure you wish to create the orb: %s Orb %s created. -Please note that any versions you publish of this orb are world-readable. You can now register versions of %s using %s.`, "bar-ns/foo-orb", "`bar-ns/foo-orb`", "`bar-ns/foo-orb`", "`bar-ns/foo-orb`", "`circleci orb publish`"))) })