File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff 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 {},
You can’t perform that action at this time.
0 commit comments