@@ -22,6 +22,7 @@ import (
22
22
"github.com/arduino/arduino-cli/cli/instance"
23
23
"github.com/arduino/arduino-cli/commands/core"
24
24
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
25
+ "github.com/sirupsen/logrus"
25
26
)
26
27
27
28
// Reference represents a reference item (core or library) passed to the CLI
@@ -55,6 +56,7 @@ func ParseReferences(args []string) ([]*Reference, error) {
55
56
56
57
// ParseReference parses a string and returns a Reference object.
57
58
func ParseReference (arg string ) (* Reference , error ) {
59
+ logrus .Infof ("Parsing reference %s" , arg )
58
60
ret := & Reference {}
59
61
if arg == "" {
60
62
return nil , fmt .Errorf (tr ("invalid empty core argument" ))
@@ -95,6 +97,7 @@ func ParseReference(arg string) (*Reference, error) {
95
97
var found = 0
96
98
for _ , platform := range platforms {
97
99
if strings .EqualFold (platform .GetId (), ret .PackageName + ":" + ret .Architecture ) {
100
+ logrus .Infof ("Found possible match for reference %s -> %s" , arg , platform .GetId ())
98
101
toks = strings .Split (platform .GetId (), ":" )
99
102
found ++
100
103
}
@@ -103,6 +106,8 @@ func ParseReference(arg string) (*Reference, error) {
103
106
if found == 1 {
104
107
ret .PackageName = toks [0 ]
105
108
ret .Architecture = toks [1 ]
109
+ } else {
110
+ logrus .Warnf ("Found %d platform for reference: %s" , found , arg )
106
111
}
107
112
return ret , nil
108
113
}
0 commit comments