Skip to content

Commit 9038313

Browse files
Merge pull request #2491 from adaptlearning/issue/2479
Always install latest compatible version of plugin
2 parents 8c3aa98 + 3c45ccd commit 9038313

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

lib/installHelpers.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -573,20 +573,14 @@ function updateFrameworkPlugins(opts, callback) {
573573
}
574574
var plugins = Object.keys(json.dependencies);
575575
async.eachSeries(plugins, function(plugin, pluginCallback) {
576-
var _done = function(error) {
576+
showSpinner(`Updating Adapt framework plugin '${plugin}'`);
577+
app.bowermanager.installLatestCompatibleVersion(plugin, error => {
577578
hideSpinner();
578579
if(error) { // log, but don't fail (see #1890)
579580
warn(`Failed to install ${plugin}, ${error}`);
580581
}
581582
pluginCallback();
582-
};
583-
showSpinner(`Updating Adapt framework plugin '${plugin}'`);
584-
585-
if(json.dependencies[plugin] === '*') {
586-
app.bowermanager.installLatestCompatibleVersion(plugin, _done);
587-
} else {
588-
app.bowermanager.installPlugin(plugin, json.dependencies[plugin], _done);
589-
}
583+
});
590584
}, function(error) {
591585
hideSpinner();
592586
if(error) {

0 commit comments

Comments
 (0)