@@ -21,12 +21,8 @@ import (
21
21
"context"
22
22
"errors"
23
23
"fmt"
24
- "os"
25
24
26
- "github.com/arduino/arduino-cli/arduino/discovery"
27
- "github.com/arduino/arduino-cli/cli"
28
25
"github.com/arduino/arduino-cli/commands"
29
- "github.com/arduino/arduino-cli/common/formatter"
30
26
"github.com/arduino/arduino-cli/rpc"
31
27
)
32
28
@@ -36,32 +32,6 @@ func BoardList(ctx context.Context, req *rpc.BoardListReq) (*rpc.BoardListResp,
36
32
return nil , errors .New ("invalid instance" )
37
33
}
38
34
39
- // Check for bultin serial-discovery tool
40
- loadBuiltinSerialDiscoveryMetadata (pm )
41
- serialDiscoveryTool , _ := getBuiltinSerialDiscoveryTool (pm )
42
- if ! serialDiscoveryTool .IsInstalled () {
43
- formatter .Print ("Downloading and installing missing tool: " + serialDiscoveryTool .String ())
44
- commands .DownloadToolRelease (pm , serialDiscoveryTool , cli .OutputProgressBar ())
45
- commands .InstallToolRelease (pm , serialDiscoveryTool , cli .OutputTaskProgress ())
46
-
47
- if err := pm .LoadHardware (cli .Config ); err != nil {
48
- formatter .PrintError (err , "Could not load hardware packages." )
49
- os .Exit (cli .ErrCoreConfig )
50
- }
51
- serialDiscoveryTool , _ = getBuiltinSerialDiscoveryTool (pm )
52
- if ! serialDiscoveryTool .IsInstalled () {
53
- formatter .PrintErrorMessage ("Missing serial-discovery tool." )
54
- os .Exit (cli .ErrCoreConfig )
55
- }
56
- }
57
-
58
- // TODO: move to 'commands' modules
59
- _ , err := discovery .NewFromCommandLine (serialDiscoveryTool .InstallDir .Join ("serial-discovery" ).String ())
60
- if err != nil {
61
- formatter .PrintError (err , "Error setting up serial-discovery tool." )
62
- os .Exit (cli .ErrCoreConfig )
63
- }
64
-
65
35
resp := & rpc.BoardListResp {Ports : []* rpc.DetectedPort {}}
66
36
for _ , disc := range commands .GetDiscoveries (req ) {
67
37
ports , err := disc .List ()
0 commit comments