Skip to content

Commit

Permalink
Added 'sketch_path' to build properties (#2372)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Oct 17, 2023
1 parent a1fad63 commit bbfdc04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arduino/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ func NewBuilder(
if boardBuildProperties != nil {
buildProperties.Merge(boardBuildProperties)
}

if sk != nil {
buildProperties.SetPath("sketch_path", sk.FullPath)
}
if buildPath != nil {
buildProperties.SetPath("build.path", buildPath)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func TestCompileShowProperties(t *testing.T) {
require.NoError(t, err, "Output must be a clean property list")
require.Empty(t, stderr)
require.True(t, props.ContainsKey("archive_file_path"))
require.True(t, props.ContainsKey("sketch_path"))
require.NotContains(t, props.Get("archive_file_path"), "{build.path}")

// Test --show-properties --format JSON output is clean
Expand Down

0 comments on commit bbfdc04

Please sign in to comment.