ref: e989468341d32be9404e86469b3563e1567df738
parent: 6c8103144fc7b65251d2ba26eb23630bc96807f0
author: Tatsushi Demachi <[email protected]>
date: Tue Dec 1 20:48:52 EST 2015
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
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -244,6 +244,11 @@
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 + "/"