commit 5c5231e09e20953dc262df7d3b351a35f1c4b058
parent d6f7a9e28dfd5abff08b6aaf6fb3493c46bd1e39
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Mon, 25 Nov 2019 19:08:35 +0100
commands: Use HUGO_ENV if set
Fixes #6456
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/commands/commands.go b/commands/commands.go
@@ -248,6 +248,11 @@ func (cc *hugoBuilderCommon) getEnvironment(isServer bool) string {
return v
}
+ // Used by Netlify and Forestry
+ if v, found := os.LookupEnv("HUGO_ENV"); found {
+ return v
+ }
+
if isServer {
return hugo.EnvironmentDevelopment
}