@@ -56,8 +56,8 @@ func newRunner(ctx context.Context, rcg *genericclioptions.ConfigFlags) *runner
56
56
c .Flags ().StringVar (& r .Description , "description" , "sample description" , "short description of the package." )
57
57
c .Flags ().StringSliceVar (& r .Keywords , "keywords" , []string {}, "list of keywords for the package." )
58
58
c .Flags ().StringVar (& r .Site , "site" , "" , "link to page with information about the package." )
59
- c .Flags ().StringVar (& r .repository , "repository" , "" , "Repository to which package will be cloned (downstream repository) ." )
60
- c .Flags ().StringVar (& r .workspace , "workspace" , "" , "Workspace name of the downstream package." )
59
+ c .Flags ().StringVar (& r .repository , "repository" , "" , "Repository to which package will be created ." )
60
+ c .Flags ().StringVar (& r .workspace , "workspace" , "" , "Workspace name of the package." )
61
61
62
62
return r
63
63
}
@@ -90,6 +90,14 @@ func (r *runner) preRunE(cmd *cobra.Command, args []string) error {
90
90
return errors .E (op , "PACKAGE_NAME is a required positional argument" )
91
91
}
92
92
93
+ if r .repository == "" {
94
+ return errors .E (op , fmt .Errorf ("--repository is required to specify target repository" ))
95
+ }
96
+
97
+ if r .workspace == "" {
98
+ return errors .E (op , fmt .Errorf ("--workspace is required to specify workspace name" ))
99
+ }
100
+
93
101
r .name = args [0 ]
94
102
pkgExists , err := util .PackageAlreadyExists (r .ctx , r .client , r .repository , r .name , * r .cfg .Namespace )
95
103
if err != nil {
0 commit comments