@@ -19,9 +19,7 @@ import (
19
19
"context"
20
20
21
21
"github.com/arduino/arduino-cli/arduino"
22
- "github.com/arduino/arduino-cli/arduino/cores"
23
22
"github.com/arduino/arduino-cli/arduino/cores/packagemanager"
24
- "github.com/arduino/arduino-cli/arduino/httpclient"
25
23
"github.com/arduino/arduino-cli/commands"
26
24
"github.com/arduino/arduino-cli/i18n"
27
25
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
@@ -51,7 +49,7 @@ func PlatformDownload(ctx context.Context, req *rpc.PlatformDownloadRequest, dow
51
49
return nil , & arduino.PlatformNotFoundError {Platform : ref .String (), Cause : err }
52
50
}
53
51
54
- if err := downloadPlatform ( pm , platform , downloadCB ); err != nil {
52
+ if err := pm . DownloadPlatformRelease ( platform , nil , downloadCB ); err != nil {
55
53
return nil , err
56
54
}
57
55
@@ -63,12 +61,3 @@ func PlatformDownload(ctx context.Context, req *rpc.PlatformDownloadRequest, dow
63
61
64
62
return & rpc.PlatformDownloadResponse {}, nil
65
63
}
66
-
67
- func downloadPlatform (pm * packagemanager.PackageManager , platformRelease * cores.PlatformRelease , downloadCB rpc.DownloadProgressCB ) error {
68
- // Download platform
69
- config , err := httpclient .GetDownloaderConfig ()
70
- if err != nil {
71
- return & arduino.FailedDownloadError {Message : tr ("Error downloading platform %s" , platformRelease ), Cause : err }
72
- }
73
- return pm .DownloadPlatformRelease (platformRelease , config , downloadCB )
74
- }
0 commit comments