Skip to content

Commit a567799

Browse files
committed
Manually installed platforms should not have version info
1 parent 8890b35 commit a567799

File tree

1 file changed

+1
-14
lines changed
  • internal/arduino/cores/packagemanager

1 file changed

+1
-14
lines changed

internal/arduino/cores/packagemanager/loader.go

+1-14
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"strconv"
2323
"strings"
2424

25-
"github.com/arduino/arduino-cli/commands/cmderrors"
2625
"github.com/arduino/arduino-cli/internal/arduino/cores"
2726
"github.com/arduino/arduino-cli/internal/i18n"
2827
"github.com/arduino/go-paths-helper"
@@ -216,19 +215,7 @@ func (pm *Builder) loadPlatform(targetPackage *cores.Package, architecture strin
216215
// 2. Inside the sketchbook/hardware/PACKAGER/ARCHITECTURE directory:
217216
// - ARCHITECTURE/boards.txt
218217

219-
// Determine platform version from the platform.txt metadata
220-
platformTxtPath := platformPath.Join("platform.txt")
221-
platformProperties, err := properties.SafeLoad(platformTxtPath.String())
222-
if err != nil {
223-
return fmt.Errorf("%s: %w", i18n.Tr("loading platform.txt"), err)
224-
}
225-
226-
versionString := platformProperties.ExpandPropsInString(platformProperties.Get("version"))
227-
version, err := semver.Parse(versionString)
228-
if err != nil {
229-
return &cmderrors.InvalidVersionError{Cause: fmt.Errorf("%s: %s", platformTxtPath, err)}
230-
}
231-
218+
version := semver.MustParse("")
232219
platform := targetPackage.GetOrCreatePlatform(architecture)
233220
release := platform.GetOrCreateRelease(version)
234221
if err := pm.loadPlatformRelease(release, platformPath); err != nil {

0 commit comments

Comments
 (0)