Skip to content

Commit

Permalink
Fix printing output if build fails
Browse files Browse the repository at this point in the history
CL: mos: Fix printing output if build fails

PUBLISHED_FROM=2a3c4c8c3d1ffc5803637333c59d2d3ce2064a3f
  • Loading branch information
Deomid Ryabkov authored and cesantabot committed Nov 29, 2018
1 parent 81a0e52 commit 0c43441
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mos/build_local.go
Expand Up @@ -31,7 +31,7 @@ import (
yaml "gopkg.in/yaml.v2"
)

func buildLocal(ctx context.Context, bParams *buildParams) (err error) {
func buildLocal(ctx context.Context, bParams *buildParams) error {
if isInDockerToolbox() {
freportf(logWriterStderr, "Docker Toolbox detected")
}
Expand All @@ -40,7 +40,7 @@ func buildLocal(ctx context.Context, bParams *buildParams) (err error) {

buildErr := buildLocal2(ctx, bParams, *cleanBuildFlag)

if !*verbose && err != nil {
if !*verbose && buildErr != nil {
log, err := os.Open(moscommon.GetBuildLogFilePath(buildDir))
if err != nil {
glog.Errorf("can't read build log: %s", err)
Expand Down

0 comments on commit 0c43441

Please sign in to comment.