Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 387188b

Browse files
committed
builder: try to setup Sketch only when SketchLocation is provided
1 parent 2732f50 commit 387188b

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

‎legacy/builder/container_setup.go‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,21 @@ func (s *ContainerSetupHardwareToolsLibsSketchAndProps) Run(ctx *types.Context)
6363
}
6464
}
6565

66-
// get abs path to sketch
67-
sketchLocation, err := ctx.SketchLocation.Abs()
68-
if err != nil {
69-
return i18n.WrapError(err)
70-
}
66+
if ctx.SketchLocation != nil {
67+
// get abs path to sketch
68+
sketchLocation, err := ctx.SketchLocation.Abs()
69+
if err != nil {
70+
return i18n.WrapError(err)
71+
}
7172

72-
// load sketch
73-
sketch, err := bldr.SketchLoad(sketchLocation.String(), ctx.BuildPath.String())
74-
if err != nil {
75-
return i18n.WrapError(err)
73+
// load sketch
74+
sketch, err := bldr.SketchLoad(sketchLocation.String(), ctx.BuildPath.String())
75+
if err != nil {
76+
return i18n.WrapError(err)
77+
}
78+
ctx.SketchLocation = paths.New(sketch.MainFile.Path)
79+
ctx.Sketch = types.SketchToLegacy(sketch)
7680
}
77-
ctx.SketchLocation = paths.New(sketch.MainFile.Path)
78-
ctx.Sketch = types.SketchToLegacy(sketch)
7981

8082
commands = []types.Command{
8183
&SetupBuildProperties{},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /