@@ -31,7 +31,7 @@ import (
3131var tr = i18n .Tr
3232
3333// 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 , parameter string ) (* rpc.LibraryDownloadResponse , error ) {
3535 logrus .Info ("Executing `arduino-cli lib download`" )
3636
3737 lm := commands .GetLibraryManager (req )
@@ -46,22 +46,22 @@ func LibraryDownload(ctx context.Context, req *rpc.LibraryDownloadRequest, downl
4646 return nil , err
4747 }
4848
49- if err := downloadLibrary (lm , lib , downloadCB , func (* rpc.TaskProgress ) {}); err != nil {
49+ if err := downloadLibrary (lm , lib , downloadCB , func (* rpc.TaskProgress ) {}, parameter ); err != nil {
5050 return nil , err
5151 }
5252
5353 return & rpc.LibraryDownloadResponse {}, nil
5454}
5555
5656func 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 {
5858
5959 taskCB (& rpc.TaskProgress {Name : tr ("Downloading %s" , libRelease )})
6060 config , err := httpclient .GetDownloaderConfig ()
6161 if err != nil {
6262 return & arduino.FailedDownloadError {Message : tr ("Can't download library" ), Cause : err }
6363 }
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 {
6565 return & arduino.FailedDownloadError {Message : tr ("Can't download library" ), Cause : err }
6666 }
6767 taskCB (& rpc.TaskProgress {Completed : true })
0 commit comments