Skip to content

Commit

Permalink
Merge pull request #2190 from kzantow/JENKINS-33828-recommended-plugi…
Browse files Browse the repository at this point in the history
…n-list-modifiable

[FIX JENKINS-33828] - setup wizard was modifying the recommended plugin list
  • Loading branch information
daniel-beck committed Mar 29, 2016
2 parents cbe9ea0 + ea6514a commit 4d01c07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion war/src/main/js/api/pluginManager.js
Expand Up @@ -46,7 +46,7 @@ exports.pluginNames = function() {
* @returns The subset of plugins (subset of the plugin list) that are recommended by default.
*/
exports.recommendedPluginNames = function() {
return plugins.recommendedPlugins;
return plugins.recommendedPlugins.slice(); // copy this
};

/**
Expand Down
6 changes: 4 additions & 2 deletions war/src/main/js/pluginSetupWizardGui.js
Expand Up @@ -288,11 +288,13 @@ var createPluginSetupWizard = function(appendTarget) {
};

// call this to go install the selected set of plugins
var installPlugins = function(plugins) {
var installPlugins = function(pluginNames) {
// make sure to have the correct list of selected plugins
selectedPluginNames = pluginNames;
// Switch to the right view but function() to force update when progressPanel re-rendered
setPanel(function() { return progressPanel(arguments); }, { installingPlugins : [] });

pluginManager.installPlugins(plugins, handleGenericError(function() {
pluginManager.installPlugins(pluginNames, handleGenericError(function() {
showInstallProgress();
}));
};
Expand Down

0 comments on commit 4d01c07

Please sign in to comment.