Skip to content

Commit 0b1c8dd

Browse files
committed
Fixed failing test
1 parent 8b4e246 commit 0b1c8dd

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
@@ -75,7 +75,12 @@ func Compile(ctx context.Context, req *rpc.CompileReq, outStream, errStream io.W
7575
return nil, errors.New("invalid instance")
7676
}
7777

78-
logrus.Tracef("Compile %s for %s started", req.GetSketchPath(), req.GetFqbn())
78+
boardArg := req.GetBoard()
79+
if boardArg == "" {
80+
boardArg = req.GetFqbn() // DEPRECATED: Keep Fqbn field working for old clients.
81+
}
82+
83+
logrus.Tracef("Compile %s for %s started", req.GetSketchPath(), boardArg)
7984
if req.GetSketchPath() == "" {
8085
return nil, fmt.Errorf("missing sketchPath")
8186
}
@@ -85,10 +90,6 @@ func Compile(ctx context.Context, req *rpc.CompileReq, outStream, errStream io.W
8590
return nil, fmt.Errorf("opening sketch: %s", err)
8691
}
8792

88-
boardArg := req.GetBoard()
89-
if boardArg == "" {
90-
boardArg = req.GetFqbn() // DEPRECATED: Keep Fqbn field working for old clients.
91-
}
9293
if boardArg == "" && sketch != nil && sketch.Metadata != nil {
9394
boardArg = sketch.Metadata.CPU.Fqbn
9495
}

0 commit comments

Comments
 (0)