Skip to content

Commit

Permalink
Merge pull request #172 from Althaf66/Althaf66/fixprojectcmd
Browse files Browse the repository at this point in the history
feat: enhanced create project cmd
  • Loading branch information
Vad1mo authored Sep 5, 2024
2 parents 8197acb + f9b8901 commit 5b88cce
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 5b88cce

Please sign in to comment.