Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #873 from gobuffalo/fix-node-env
Browse files Browse the repository at this point in the history
NODE_ENV not being set to production during build fixes #845
  • Loading branch information
markbates authored Jan 24, 2018
2 parents 4fc4128 + d8ac7af commit 0c9666a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions buffalo/cmd/build/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import (
func (b *Builder) buildAssets() error {

if b.WithWebpack && b.Options.WithAssets {
envy.Set("NODE_ENV", "production")
err := b.exec(webpack.BinPath)
if err != nil {
if err := envy.MustSet("NODE_ENV", "production"); err != nil {
return errors.WithStack(err)
}
if err := b.exec(webpack.BinPath); err != nil {
return errors.WithStack(err)
}
}
Expand Down

0 comments on commit 0c9666a

Please sign in to comment.