summaryrefslogtreecommitdiffstats
path: root/commands/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/commands.go')
-rw-r--r--commands/commands.go5
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
}