Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions legacy/builder/container_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down