Fix benchmark panic
authorNoah Campbell <noahcampbell@gmail.com>
Sat, 2 Nov 2013 03:36:11 +0000 (20:36 -0700)
committerNoah Campbell <noahcampbell@gmail.com>
Sat, 2 Nov 2013 03:36:11 +0000 (20:36 -0700)
Need to initialize the Config with InitializeConfig().

commands/benchmark.go

index 010c1ed2b0854a19991d0488aab0418628a18d56..dd3634b1ee958a12c9667ce0e48bc46975c8249b 100644 (file)
@@ -27,7 +27,10 @@ var benchmark = &cobra.Command{
        Short: "Benchmark hugo by building a site a number of times",
        Long: `Hugo can build a site many times over and anlyze the
     running process creating a `,
-       Run: bench,
+       Run: func(cmd *cobra.Command, args []string) {
+               InitializeConfig()
+               bench(cmd, args)
+       },
 }
 
 func init() {