Skip to content

Commit 3b12880

Browse files
committed
fix error creation
1 parent 75dd8ee commit 3b12880

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: legacy/builder/container_merge_copy_sketch_files.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ import (
3434
"github.com/arduino/arduino-cli/arduino/sketch"
3535
"github.com/arduino/arduino-cli/legacy/builder/i18n"
3636
"github.com/arduino/arduino-cli/legacy/builder/types"
37+
"github.com/go-errors/errors"
3738
)
3839

3940
type ContainerMergeCopySketchFiles struct{}
4041

4142
func (s *ContainerMergeCopySketchFiles) Run(ctx *types.Context) error {
4243
sk := types.SketchFromLegacy(ctx.Sketch)
4344
if sk == nil {
44-
return i18n.WrapError("unable to convert legacy sketch to the new type")
45+
return i18n.WrapError(errors.New("unable to convert legacy sketch to the new type"))
4546
}
4647
offset, source := bldr.MergeSketchSources(sk)
4748
ctx.LineOffset = offset

0 commit comments

Comments
 (0)