summaryrefslogtreecommitdiffstats
path: root/commands/hugo.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 2b53d5cd6..4fd20a0f4 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -116,11 +116,11 @@ func Execute(args []string) Response {
}
// InitializeConfig initializes a config file with sensible default configuration flags.
-func initializeConfig(mustHaveConfigFile, running bool,
+func initializeConfig(mustHaveConfigFile, failOnInitErr, running bool,
h *hugoBuilderCommon,
f flagsToConfigHandler,
cfgInit func(c *commandeer) error) (*commandeer, error) {
- c, err := newCommandeer(mustHaveConfigFile, running, h, f, cfgInit)
+ c, err := newCommandeer(mustHaveConfigFile, failOnInitErr, running, h, f, cfgInit)
if err != nil {
return nil, err
}
@@ -128,7 +128,7 @@ func initializeConfig(mustHaveConfigFile, running bool,
return c, nil
}
-func (c *commandeer) createLogger(cfg config.Provider, running bool) (loggers.Logger, error) {
+func (c *commandeer) createLogger(cfg config.Provider) (loggers.Logger, error) {
var (
logHandle = ioutil.Discard
logThreshold = jww.LevelWarn
@@ -172,7 +172,7 @@ func (c *commandeer) createLogger(cfg config.Provider, running bool) (loggers.Lo
loggers.InitGlobalLogger(stdoutThreshold, logThreshold, outHandle, logHandle)
helpers.InitLoggers()
- return loggers.NewLogger(stdoutThreshold, logThreshold, outHandle, logHandle, running), nil
+ return loggers.NewLogger(stdoutThreshold, logThreshold, outHandle, logHandle, c.running), nil
}
func initializeFlags(cmd *cobra.Command, cfg config.Provider) {
@@ -792,7 +792,7 @@ func (c *commandeer) fullRebuild(changeType string) {
defer c.timeTrack(time.Now(), "Rebuilt")
c.commandeerHugoState = newCommandeerHugoState()
- err := c.loadConfig(true, true)
+ err := c.loadConfig()
if err != nil {
// Set the processing on pause until the state is recovered.
c.paused = true