Skip to content

Commit

Permalink
modified project create cmd
Browse files Browse the repository at this point in the history
Signed-off-by: ALTHAF <althafasharaf02@gmail.com>
  • Loading branch information
Althaf66 committed Aug 18, 2024
1 parent 8197acb commit f9b8901
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/harbor/root/project/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ func CreateProjectCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "create [project name]",
Short: "create project",
Args: cobra.ExactArgs(1),
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
opts.ProjectName = args[0]
var err error
createView := &create.CreateView{
ProjectName: opts.ProjectName,
Expand All @@ -28,8 +27,6 @@ func CreateProjectCommand() *cobra.Command {
if len(args) > 0 {
opts.ProjectName = args[0]
err = api.CreateProject(opts)
} else if opts.ProjectName != "" && opts.RegistryID != "" && opts.StorageLimit != "" {
err = api.CreateProject(opts)
} else {
err = createProjectView(createView)
}
Expand Down

0 comments on commit f9b8901

Please sign in to comment.