Skip to content

Commit

Permalink
commands: Use HUGO_ENV if set
Browse files Browse the repository at this point in the history
Fixes #6456
  • Loading branch information
bep committed Nov 25, 2019
1 parent d6f7a9e commit 5c5231e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5c5231e

Please sign in to comment.