@@ -31,7 +31,7 @@ import (
31
31
// LibraryInstall FIXMEDOC
32
32
func LibraryInstall (ctx context.Context , req * rpc.LibraryInstallRequest , downloadCB rpc.DownloadProgressCB , taskCB rpc.TaskProgressCB ) error {
33
33
34
- lm := commands .GetLibraryManager (req . GetInstance (). GetId () )
34
+ lm := commands .GetLibraryManager (req )
35
35
if lm == nil {
36
36
return & arduino.InvalidInstanceError {}
37
37
}
@@ -148,19 +148,19 @@ func installLibrary(lm *librariesmanager.LibrariesManager, libRelease *libraries
148
148
return nil
149
149
}
150
150
151
- //ZipLibraryInstall FIXMEDOC
151
+ // ZipLibraryInstall FIXMEDOC
152
152
func ZipLibraryInstall (ctx context.Context , req * rpc.ZipLibraryInstallRequest , taskCB rpc.TaskProgressCB ) error {
153
- lm := commands .GetLibraryManager (req . GetInstance (). GetId () )
153
+ lm := commands .GetLibraryManager (req )
154
154
if err := lm .InstallZipLib (ctx , req .Path , req .Overwrite ); err != nil {
155
155
return & arduino.FailedLibraryInstallError {Cause : err }
156
156
}
157
157
taskCB (& rpc.TaskProgress {Message : tr ("Library installed" ), Completed : true })
158
158
return nil
159
159
}
160
160
161
- //GitLibraryInstall FIXMEDOC
161
+ // GitLibraryInstall FIXMEDOC
162
162
func GitLibraryInstall (ctx context.Context , req * rpc.GitLibraryInstallRequest , taskCB rpc.TaskProgressCB ) error {
163
- lm := commands .GetLibraryManager (req . GetInstance (). GetId () )
163
+ lm := commands .GetLibraryManager (req )
164
164
if err := lm .InstallGitLib (req .Url , req .Overwrite ); err != nil {
165
165
return & arduino.FailedLibraryInstallError {Cause : err }
166
166
}
0 commit comments