From e989468341d32be9404e86469b3563e1567df738 Mon Sep 17 00:00:00 2001 From: Tatsushi Demachi Date: Wed, 2 Dec 2015 01:48:52 +0900 Subject: [PATCH] Make noTimes command flag work Hugo command provides "noTimes" flag but it doesn't affect synced files timestamp regardless of whether the flag is specified or not. This fixes it by adding a flag check and overwriting configuration if it is specified. Fix #1583 --- commands/hugo.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/hugo.go b/commands/hugo.go index c275fccc9..ea8179780 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -244,6 +244,11 @@ func InitializeConfig() { if hugoCmdV.PersistentFlags().Lookup("logFile").Changed { viper.Set("LogFile", LogFile) } + + if hugoCmdV.Flags().Lookup("noTimes").Changed { + viper.Set("noTimes", NoTimes) + } + if BaseURL != "" { if !strings.HasSuffix(BaseURL, "/") { BaseURL = BaseURL + "/"