Skip to content

Commit bfa02dd

Browse files
committed
Use PlatformRelease.IsInstalled() method when appropriate
1 parent 3819f27 commit bfa02dd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arduino/cores/cores.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ package cores
2020
import (
2121
"strings"
2222

23-
"github.com/arduino/go-paths-helper"
23+
paths "github.com/arduino/go-paths-helper"
2424

2525
"github.com/arduino/arduino-cli/arduino/resources"
26-
"github.com/arduino/go-properties-orderedmap"
27-
"go.bug.st/relaxed-semver"
26+
properties "github.com/arduino/go-properties-orderedmap"
27+
semver "go.bug.st/relaxed-semver"
2828
)
2929

3030
// Platform represents a platform package.
@@ -158,7 +158,7 @@ func (platform *Platform) latestReleaseVersion() *semver.Version {
158158
func (platform *Platform) GetAllInstalled() []*PlatformRelease {
159159
res := []*PlatformRelease{}
160160
for _, release := range platform.Releases {
161-
if release.InstallDir != nil {
161+
if release.IsInstalled() {
162162
res = append(res, release)
163163
}
164164
}

0 commit comments

Comments
 (0)