@@ -56,7 +56,7 @@ If archetypes are provided in your theme or site, they will be used.
56
56
Ensure you run this within the root directory of your site.` ,
57
57
run : func (ctx context.Context , cd * simplecobra.Commandeer , r * rootCommand , args []string ) error {
58
58
if len (args ) < 1 {
59
- return errors . New ("path needs to be provided" )
59
+ return newUserError ("path needs to be provided" )
60
60
}
61
61
h , err := r .Hugo (flagsToCfg (cd , nil ))
62
62
if err != nil {
@@ -82,7 +82,7 @@ The new site will have the correct structure, but no content or theme yet.
82
82
Use ` + "`hugo new [contentPath]`" + ` to create new content.` ,
83
83
run : func (ctx context.Context , cd * simplecobra.Commandeer , r * rootCommand , args []string ) error {
84
84
if len (args ) < 1 {
85
- return errors . New ("path needs to be provided" )
85
+ return newUserError ("path needs to be provided" )
86
86
}
87
87
createpath , err := filepath .Abs (filepath .Clean (args [0 ]))
88
88
if err != nil {
@@ -162,6 +162,9 @@ New theme is a skeleton. Please add content to the touched files. Add your
162
162
name to the copyright line in the license and adjust the theme.toml file
163
163
according to your needs.` ,
164
164
run : func (ctx context.Context , cd * simplecobra.Commandeer , r * rootCommand , args []string ) error {
165
+ if len (args ) < 1 {
166
+ return newUserError ("theme name needs to be provided" )
167
+ }
165
168
h , err := r .Hugo (flagsToCfg (cd , nil ))
166
169
if err != nil {
167
170
return err
0 commit comments