@@ -31,7 +31,7 @@ import (
31
31
var tr = i18n .Tr
32
32
33
33
// LibraryDownload FIXMEDOC
34
- func LibraryDownload (ctx context.Context , req * rpc.LibraryDownloadRequest , downloadCB rpc.DownloadProgressCB ) (* rpc.LibraryDownloadResponse , error ) {
34
+ func LibraryDownload (ctx context.Context , req * rpc.LibraryDownloadRequest , downloadCB rpc.DownloadProgressCB , queryParameter string ) (* rpc.LibraryDownloadResponse , error ) {
35
35
logrus .Info ("Executing `arduino-cli lib download`" )
36
36
37
37
lm := commands .GetLibraryManager (req )
@@ -46,22 +46,22 @@ func LibraryDownload(ctx context.Context, req *rpc.LibraryDownloadRequest, downl
46
46
return nil , err
47
47
}
48
48
49
- if err := downloadLibrary (lm , lib , downloadCB , func (* rpc.TaskProgress ) {}); err != nil {
49
+ if err := downloadLibrary (lm , lib , downloadCB , func (* rpc.TaskProgress ) {}, queryParameter ); err != nil {
50
50
return nil , err
51
51
}
52
52
53
53
return & rpc.LibraryDownloadResponse {}, nil
54
54
}
55
55
56
56
func downloadLibrary (lm * librariesmanager.LibrariesManager , libRelease * librariesindex.Release ,
57
- downloadCB rpc.DownloadProgressCB , taskCB rpc.TaskProgressCB ) error {
57
+ downloadCB rpc.DownloadProgressCB , taskCB rpc.TaskProgressCB , queryParameter string ) error {
58
58
59
59
taskCB (& rpc.TaskProgress {Name : tr ("Downloading %s" , libRelease )})
60
60
config , err := httpclient .GetDownloaderConfig ()
61
61
if err != nil {
62
62
return & arduino.FailedDownloadError {Message : tr ("Can't download library" ), Cause : err }
63
63
}
64
- if err := libRelease .Resource .Download (lm .DownloadsDir , config , libRelease .String (), downloadCB ); err != nil {
64
+ if err := libRelease .Resource .Download (lm .DownloadsDir , config , libRelease .String (), downloadCB , queryParameter ); err != nil {
65
65
return & arduino.FailedDownloadError {Message : tr ("Can't download library" ), Cause : err }
66
66
}
67
67
taskCB (& rpc.TaskProgress {Completed : true })
0 commit comments