@@ -131,6 +131,7 @@ func runAttachCommand(cmd *cobra.Command, args []string) {
131
131
// TODO: Handle the case when no board is found.
132
132
board := findBoardFunc (pm , monitor , deviceURI )
133
133
if board == nil {
134
+ formatter .PrintErrorMessage ("No supported board has been found at " + deviceURI .String () + ", try either install new cores or check your board URI." )
134
135
os .Exit (commands .ErrGeneric )
135
136
}
136
137
formatter .Print ("Board found: " + board .Name ())
@@ -164,13 +165,11 @@ func findSerialConnectedBoard(pm *packagemanager.PackageManager, monitor *discov
164
165
}
165
166
}
166
167
if ! found {
167
- formatter .PrintErrorMessage ("Sorry, no Supported board has been found at the specified board URI :-(" )
168
168
return nil
169
169
}
170
170
171
171
boards := pm .FindBoardsWithVidPid (serialDevice .VendorID , serialDevice .ProductID )
172
172
if len (boards ) == 0 {
173
- formatter .PrintErrorMessage ("No Supported board has been found, try either install new cores or check your board URI." )
174
173
os .Exit (commands .ErrGeneric )
175
174
}
176
175
@@ -193,14 +192,12 @@ func findNetworkConnectedBoard(pm *packagemanager.PackageManager, monitor *disco
193
192
}
194
193
}
195
194
if ! found {
196
- formatter .PrintErrorMessage ("No Supported board has been found at the specified board URI, try either install new cores or check your board URI." )
197
- os .Exit (commands .ErrGeneric )
195
+ return nil
198
196
}
199
197
200
198
boards := pm .FindBoardsWithID (networkDevice .Name )
201
199
if len (boards ) == 0 {
202
- formatter .PrintErrorMessage ("No Supported board has been found, try either install new cores or check your board URI." )
203
- os .Exit (commands .ErrGeneric )
200
+ return nil
204
201
}
205
202
206
203
return boards [0 ]
0 commit comments