Skip to content

Commit d3692b6

Browse files
committed
Renamed variables for clarity
1 parent a99de24 commit d3692b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/arduino/builder/builder.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func NewBuilder(
121121
coreBuildCachePath *paths.Path,
122122
extraCoreBuildCachePaths paths.PathList,
123123
jobs int,
124-
requestBuildProperties []string,
124+
customBuildProperties []string,
125125
hardwareDirs paths.PathList,
126126
librariesDirs paths.PathList,
127127
builtInLibrariesDirs *paths.Path,
@@ -162,11 +162,11 @@ func NewBuilder(
162162
}
163163

164164
// Add user provided custom build properties
165-
customBuildProperties, err := properties.LoadFromSlice(requestBuildProperties)
166-
if err != nil {
165+
if p, err := properties.LoadFromSlice(customBuildProperties); err == nil {
166+
buildProperties.Merge(p)
167+
} else {
167168
return nil, fmt.Errorf("invalid build properties: %w", err)
168169
}
169-
buildProperties.Merge(customBuildProperties)
170170

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

0 commit comments

Comments
 (0)