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
3 changes: 3 additions & 0 deletions arduino/builder/sketch.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ func SketchCopyAdditionalFiles(sketch *sketch.Sketch, destPath string, overrides
sourceBytes = s
}

// tag each addtional file with the filename of the source it was copied from
sourceBytes = append([]byte("#line 1 "+QuoteCppString(item.Path)+"\n"), sourceBytes...)

err = writeIfDifferent(sourceBytes, targetPath)
if err != nil {
return errors.Wrap(err, "unable to write to destination file")
Expand Down