summaryrefslogtreecommitdiffstats
path: root/commands/server.go
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2015-12-03 12:02:38 -0700
committerAnthony Fok <foka@debian.org>2015-12-03 12:02:38 -0700
commitcd062623bd9eb1ded58b774086236ccc8130db8b (patch)
tree12722d5cb851de6fcc5f32ea97ceaca6db8bc600 /commands/server.go
parent69c28985ea6ca58ebb0b34f30f9f43f42502d318 (diff)
Fix crash with "config", "check" and "benchmark"
The crash was introduced by commit 00d04774 in PR #1652 where access to NoTimes was attempted even though --noTimes was not defined for the config, check and benchmark commands. Special thanks to @bep for the heads-up! See also #1624 - CLI UX: Flags shouldn't be global
Diffstat (limited to 'commands/server.go')
-rw-r--r--commands/server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/server.go b/commands/server.go
index adcf6dff2..1ca39278b 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -148,6 +148,10 @@ func server(cmd *cobra.Command, args []string) error {
viper.Set("PublishDir", "/")
}
+ if serverCmd.Flags().Lookup("noTimes").Changed {
+ viper.Set("NoTimes", NoTimes)
+ }
+
if err := build(serverWatch); err != nil {
return err
}