You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: arduino-ide-extension/src/node/library-service-impl.ts
+19-15
Original file line number
Diff line number
Diff line change
@@ -373,22 +373,26 @@ export class LibraryServiceImpl
373
373
374
374
// stop the board discovery
375
375
awaitthis.boardDiscovery.stop();
376
-
377
-
constresp=client.zipLibraryInstall(req);
378
-
resp.on(
379
-
'data',
380
-
ExecuteWithProgress.createDataCallback({
381
-
progressId,
382
-
responseService: this.responseService,
383
-
})
384
-
);
385
-
awaitnewPromise<void>((resolve,reject)=>{
386
-
resp.on('end',()=>{
387
-
this.boardDiscovery.start();// TODO: remove discovery dependency from boards service. See https://github.com/arduino/arduino-ide/pull/1107 why this is here.
388
-
resolve();
376
+
try{
377
+
constresp=client.zipLibraryInstall(req);
378
+
resp.on(
379
+
'data',
380
+
ExecuteWithProgress.createDataCallback({
381
+
progressId,
382
+
responseService: this.responseService,
383
+
})
384
+
);
385
+
awaitnewPromise<void>((resolve,reject)=>{
386
+
resp.on('end',resolve);
387
+
resp.on('error',reject);
389
388
});
390
-
resp.on('error',reject);
391
-
});
389
+
awaitthis.refresh();// let the CLI re-scan the libraries
390
+
this.notificationServer.notifyLibraryDidInstall({
391
+
item: 'zip-install',
392
+
});
393
+
}finally{
394
+
this.boardDiscovery.start();// TODO: remove discovery dependency from boards service. See https://github.com/arduino/arduino-ide/pull/1107 why this is here.
0 commit comments