Skip to content

Commit a6411ed

Browse files
fix wrong type assertion
1 parent 5725c02 commit a6411ed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: internal/cli/core/upgrade.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package core
1717

1818
import (
1919
"context"
20-
"errors"
2120
"fmt"
2221
"os"
2322

@@ -110,7 +109,7 @@ func Upgrade(inst *rpc.Instance, args []string, skipPostInstall bool) {
110109
response, err := core.PlatformUpgrade(context.Background(), r, feedback.ProgressBar(), feedback.TaskProgress())
111110
warningMissingIndex(response)
112111
if err != nil {
113-
if errors.Is(err, &arduino.PlatformAlreadyAtTheLatestVersionError{}) {
112+
if _, ok := err.(*arduino.PlatformAlreadyAtTheLatestVersionError); ok {
114113
feedback.Print(err.Error())
115114
continue
116115
}

0 commit comments

Comments
 (0)