Make sure build errors let the build command exit with a error code.
This commit is contained in:
6
build.go
6
build.go
@@ -35,7 +35,11 @@ func buildAction(ctx *cli.Context) error {
|
||||
|
||||
esBuildCfg.Plugins = append(esBuildCfg.Plugins, contentSwapPlugin(o))
|
||||
|
||||
api.Build(esBuildCfg)
|
||||
result := api.Build(esBuildCfg)
|
||||
if len(result.Errors) > 0 {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
replace(o)
|
||||
|
||||
if ctx.Bool("p") && o.ProductionBuildOptions.CmdPostBuild != "" {
|
||||
|
Reference in New Issue
Block a user