From: Bjørn Erik Pedersen Date: Mon, 25 Nov 2019 18:08:35 +0000 (+0100) Subject: commands: Use HUGO_ENV if set X-Git-Tag: v0.60.0~17 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5c5231e09e20953dc262df7d3b351a35f1c4b058;p=brevno-suite%2Fhugo commands: Use HUGO_ENV if set Fixes #6456 --- diff --git a/commands/commands.go b/commands/commands.go index 1b09a12a..2187f7aa 100644 --- 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 }