diff --git a/arduino/builder/builder.go b/arduino/builder/builder.go index d3c7f2b73ca..51646bdcf48 100644 --- a/arduino/builder/builder.go +++ b/arduino/builder/builder.go @@ -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) } diff --git a/internal/integrationtest/compile_3/compile_show_properties_test.go b/internal/integrationtest/compile_3/compile_show_properties_test.go index a0dc1321ca3..1c17ef63d47 100644 --- a/internal/integrationtest/compile_3/compile_show_properties_test.go +++ b/internal/integrationtest/compile_3/compile_show_properties_test.go @@ -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