Skip to content

Commit 054e725

Browse files
committed
Renamed variables for clarity
1 parent 13d5d5e commit 054e725

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/arduino/builder/builder.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func NewBuilder(
122122
coreBuildCachePath *paths.Path,
123123
extraCoreBuildCachePaths paths.PathList,
124124
jobs int,
125-
requestBuildProperties []string,
125+
customBuildProperties []string,
126126
hardwareDirs paths.PathList,
127127
librariesDirs paths.PathList,
128128
builtInLibrariesDirs *paths.Path,
@@ -163,11 +163,11 @@ func NewBuilder(
163163
}
164164

165165
// Add user provided custom build properties
166-
customBuildProperties, err := properties.LoadFromSlice(requestBuildProperties)
167-
if err != nil {
166+
if p, err := properties.LoadFromSlice(customBuildProperties); err == nil {
167+
buildProperties.Merge(p)
168+
} else {
168169
return nil, fmt.Errorf("invalid build properties: %w", err)
169170
}
170-
buildProperties.Merge(customBuildProperties)
171171

172172
sketchBuildPath, err := buildPath.Join("sketch").Abs()
173173
if err != nil {
@@ -226,7 +226,7 @@ func NewBuilder(
226226
hardwareDirs, librariesDirs,
227227
builtInLibrariesDirs, buildPath,
228228
sk,
229-
requestBuildProperties,
229+
customBuildProperties,
230230
fqbn,
231231
clean,
232232
buildProperties.Get("compiler.optimization_flags"),

0 commit comments

Comments
 (0)