Skip to content

Commit 2d3b4c4

Browse files
committed
do not expect binary artifacts when preprocess or show-properties
1 parent cb5de1c commit 2d3b4c4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: commands/compile/compile.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,16 @@ func Compile(ctx context.Context, req *rpc.CompileReq, outStream, errStream io.W
158158
builderCtx.ExecStdout = outStream
159159
builderCtx.ExecStderr = errStream
160160
builderCtx.SetLogger(i18n.LoggerToCustomStreams{Stdout: outStream, Stderr: errStream})
161+
162+
// if --preprocess or --show-properties were passed, we can stop here
161163
if req.GetShowProperties() {
162-
err = builder.RunParseHardwareAndDumpBuildProperties(builderCtx)
164+
return &rpc.CompileResp{}, builder.RunParseHardwareAndDumpBuildProperties(builderCtx)
163165
} else if req.GetPreprocess() {
164-
err = builder.RunPreprocess(builderCtx)
165-
} else {
166-
err = builder.RunBuilder(builderCtx)
166+
return &rpc.CompileResp{}, builder.RunPreprocess(builderCtx)
167167
}
168168

169-
if err != nil {
169+
// if it's a regular build, go on...
170+
if err := builder.RunBuilder(builderCtx); err != nil {
170171
return nil, fmt.Errorf("build failed: %s", err)
171172
}
172173

0 commit comments

Comments
 (0)