You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command new theme panics if no argument name is given for the name of the theme:
hugo v.0.114.1 (panic)
$ hugo new theme
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/gohugoio/hugo/commands.newNewCommand.func5({0x0?, 0x0?}, 0x0?, 0xc000dbaa00, {0x3aa2188, 0x0, 0x0?})
/root/project/hugo/commands/new.go:170 +0xa48
github.com/gohugoio/hugo/commands.(*simpleCommand).Run(0x0?, {0x2ab0228?, 0xc0000380f8?}, 0x0?, {0x3aa2188?, 0x0?, 0x0?})
/root/project/hugo/commands/commandeer.go:597 +0x43
github.com/bep/simplecobra.(*Commandeer).compile.func1(0xc000005800?, {0x3aa2188?, 0x0?, 0x0?})
/root/project/gomodcache/github.com/bep/simplecobra@v0.3.2/simplecobra.go:113 +0x52
github.com/spf13/cobra.(*Command).execute(0xc000005800, {0x3aa2188, 0x0, 0x0})
/root/project/gomodcache/github.com/spf13/cobra@v1.7.0/command.go:940 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc000d7c300)
/root/project/gomodcache/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
/root/project/gomodcache/github.com/spf13/cobra@v1.7.0/command.go:1001
github.com/bep/simplecobra.(*Exec).Execute(0xc00000a738, {0x2ab0228?, 0xc0000380f8?}, {0xc000058090?, 0x195b28?, 0xc000081138?})
/root/project/gomodcache/github.com/bep/simplecobra@v0.3.2/simplecobra.go:155 +0xd9
github.com/gohugoio/hugo/commands.Execute({0xc000058090, 0x2, 0x3})
/root/project/hugo/commands/commandeer.go:66 +0x312
main.main()
/root/project/hugo/main.go:25 +0x65
This wasn't the case with previous versions:
hugo v.0.101 (error message, no panic)
$ hugo_0.101.0.exe new theme
Error: theme name needs to be provided
Usage:
hugo new theme [name] [flags]
Flags:
-h, --help help for theme
Global Flags:
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
--config string config file (default is path/config.yaml|json|toml)
--configDir string config dir (default "config")
--debug debug output
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-s, --source string filesystem path to read files relative from
--themesDir string filesystem path to themes directory
-v, --verbose verbose output
--verboseLog verbose logging
Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered:
The command
new theme
panics if no argumentname
is given for the name of the theme:hugo v.0.114.1 (panic)
This wasn't the case with previous versions:
hugo v.0.101 (error message, no panic)
Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: