Skip to content

Commit a811e72

Browse files
committed
do not assume public when creating repo non-interactively
1 parent 3a492b8 commit a811e72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/cmd/repo/create/create.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co
7575

7676
if !opts.IO.CanPrompt() {
7777
if opts.Name == "" {
78-
return &cmdutil.FlagError{Err: errors.New("must pass name argument when not running interactively")}
78+
return &cmdutil.FlagError{Err: errors.New("name argument required when not running interactively")}
7979
}
80+
8081
if !opts.Internal && !opts.Private && !opts.Public {
81-
opts.Public = true
82+
return &cmdutil.FlagError{Err: errors.New("--public, --private, or --internal required when not running interactively")}
8283
}
8384
}
8485

0 commit comments

Comments
 (0)