ref: 5c5231e09e20953dc262df7d3b351a35f1c4b058
parent: d6f7a9e28dfd5abff08b6aaf6fb3493c46bd1e39
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Mon Nov 25 14:08:35 EST 2019
commands: Use HUGO_ENV if set Fixes #6456
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -248,6 +248,11 @@
return v
}
+ // Used by Netlify and Forestry
+ if v, found := os.LookupEnv("HUGO_ENV"); found {
+ return v
+ }
+
if isServer {
return hugo.EnvironmentDevelopment
}