Unverified Commit 4c32595f authored by Cristian Maglie's avatar Cristian Maglie Committed by GitHub

builder: try to setup Sketch only when SketchLocation is provided (#429)

parent c9836a97
......@@ -63,19 +63,21 @@ func (s *ContainerSetupHardwareToolsLibsSketchAndProps) Run(ctx *types.Context)
}
}
// get abs path to sketch
sketchLocation, err := ctx.SketchLocation.Abs()
if err != nil {
return i18n.WrapError(err)
}
if ctx.SketchLocation != nil {
// get abs path to sketch
sketchLocation, err := ctx.SketchLocation.Abs()
if err != nil {
return i18n.WrapError(err)
}
// load sketch
sketch, err := bldr.SketchLoad(sketchLocation.String(), ctx.BuildPath.String())
if err != nil {
return i18n.WrapError(err)
// load sketch
sketch, err := bldr.SketchLoad(sketchLocation.String(), ctx.BuildPath.String())
if err != nil {
return i18n.WrapError(err)
}
ctx.SketchLocation = paths.New(sketch.MainFile.Path)
ctx.Sketch = types.SketchToLegacy(sketch)
}
ctx.SketchLocation = paths.New(sketch.MainFile.Path)
ctx.Sketch = types.SketchToLegacy(sketch)
commands = []types.Command{
&SetupBuildProperties{},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment