From: Tatsushi Demachi Date: Tue, 1 Dec 2015 16:48:52 +0000 (+0900) Subject: Make noTimes command flag work X-Git-Tag: v0.16~561 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e989468341d32be9404e86469b3563e1567df738;p=brevno-suite%2Fhugo 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 --- diff --git a/commands/hugo.go b/commands/hugo.go index c275fccc..ea817978 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 + "/"