mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
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
This commit is contained in:
parent
6c8103144f
commit
e989468341
1 changed files with 5 additions and 0 deletions
|
@ -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 + "/"
|
||||
|
|
Loading…
Reference in a new issue