Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d1929de

Browse files
committed
Removed all wrong accesses to package Explorer
1 parent f2609ca commit d1929de

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

‎internal/cli/arguments/completion.go‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020

2121
"github.com/arduino/arduino-cli/commands/board"
2222
"github.com/arduino/arduino-cli/commands/core"
23-
"github.com/arduino/arduino-cli/commands/internal/instances"
2423
"github.com/arduino/arduino-cli/commands/lib"
2524
"github.com/arduino/arduino-cli/commands/upload"
2625
"github.com/arduino/arduino-cli/internal/cli/instance"
@@ -51,13 +50,6 @@ func GetInstalledBoards() []string {
5150
func GetInstalledProtocols() []string {
5251
inst := instance.CreateAndInit()
5352

54-
// FIXME: We must not access PackageManager directly here but use one of the commands.* functions
55-
pme, release := instances.GetPackageManagerExplorer(inst)
56-
if pme == nil {
57-
return nil // should never happen...
58-
}
59-
defer release()
60-
6153
boards := pme.InstalledBoards()
6254

6355
installedProtocols := make(map[string]struct{})
@@ -94,13 +86,6 @@ func GetInstalledProgrammers() []string {
9486
}
9587
list, _ := board.ListAll(context.Background(), listAllReq)
9688

97-
// FIXME: We must not access PackageManager directly here but use one of the commands.* functions
98-
pme, release := instances.GetPackageManagerExplorer(inst)
99-
if pme == nil {
100-
return nil // should never happen...
101-
}
102-
defer release()
103-
10489
installedProgrammers := make(map[string]string)
10590
for _, board := range list.Boards {
10691
programmers, _ := upload.ListProgrammersAvailableForUpload(context.Background(), &rpc.ListProgrammersAvailableForUploadRequest{

‎internal/cli/arguments/port.go‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121

2222
"github.com/arduino/arduino-cli/arduino"
2323
"github.com/arduino/arduino-cli/commands/board"
24-
"github.com/arduino/arduino-cli/commands/internal/instances"
2524
"github.com/arduino/arduino-cli/internal/cli/feedback"
2625
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
2726
"github.com/sirupsen/logrus"
@@ -88,13 +87,6 @@ func (p *Port) GetPort(instance *rpc.Instance, defaultAddress, defaultProtocol s
8887
}
8988
logrus.WithField("port", address).Tracef("Upload port")
9089

91-
// FIXME: We must not access PackageManager directly here but use one of the commands.* functions
92-
pme, release := instances.GetPackageManagerExplorer(instance)
93-
if pme == nil {
94-
return nil, &arduino.InvalidInstanceError{}
95-
}
96-
defer release()
97-
9890
dm := pme.DiscoveryManager()
9991
watcher, err := dm.Watch()
10092
if err != nil {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /