@@ -359,7 +359,7 @@ async function initPrompts (id, context) {
359
359
await prompts . start ( )
360
360
}
361
361
362
- function update ( id , context , notify = true ) {
362
+ function update ( id , context , multi = false ) {
363
363
return progress . wrap ( 'plugin-update' , context , async setProgress => {
364
364
setProgress ( {
365
365
status : 'plugin-update' ,
@@ -376,12 +376,13 @@ function update (id, context, notify = true) {
376
376
type : 'info'
377
377
} , context )
378
378
379
- if ( notify ) {
379
+ if ( ! multi ) {
380
380
notify ( {
381
381
title : `Plugin updated` ,
382
382
message : `Plugin ${ id } was successfully updated` ,
383
383
icon : 'done'
384
384
} )
385
+ resetPluginApi ( context )
385
386
}
386
387
387
388
currentPluginId = null
@@ -395,7 +396,7 @@ async function updateAll (context) {
395
396
for ( const plugin of plugins ) {
396
397
const version = await getVersion ( plugin , context )
397
398
if ( version . current !== version . wanted ) {
398
- updatedPlugins . push ( await update ( plugin . id , context , false ) )
399
+ updatedPlugins . push ( await update ( plugin . id , context , true ) )
399
400
}
400
401
}
401
402
@@ -404,6 +405,7 @@ async function updateAll (context) {
404
405
message : `${ updatedPlugins . length } plugin(s) were successfully updated` ,
405
406
icon : 'done'
406
407
} )
408
+ resetPluginApi ( context )
407
409
408
410
return updatedPlugins
409
411
}
0 commit comments