Skip to content
Permalink
Browse files

commands: Use HUGO_ENV if set

Fixes #6456
  • Loading branch information
bep committed Nov 25, 2019
1 parent d6f7a9e commit 5c5231e09e20953dc262df7d3b351a35f1c4b058
Showing with 5 additions and 0 deletions.
  1. +5 −0 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
}

0 comments on commit 5c5231e

Please sign in to comment.
You can’t perform that action at this time.