diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-11-25 19:08:35 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-11-25 19:12:14 +0100 |
commit | 5c5231e09e20953dc262df7d3b351a35f1c4b058 (patch) | |
tree | 1f7d236f07fdfe424497f2a60b91d14d0ec5384e /commands | |
parent | d6f7a9e28dfd5abff08b6aaf6fb3493c46bd1e39 (diff) |
commands: Use HUGO_ENV if set
Fixes #6456
Diffstat (limited to 'commands')
-rw-r--r-- | commands/commands.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/commands.go b/commands/commands.go index 1b09a12a3..2187f7aab 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 } |