Merge branch 'stable-2.11' into stable-2.12
* stable-2.11: Fix query for changes using a label with a group operator. Add !important back to .cm-searching and .cm-trailingspace HttpPluginServlet: Fix "short read of block" IO error on plugin docs HttpPluginServlet: Use try-with-resource in readWholeEntry Make InternalChangeQuery.query public so it can be used by plugins InitPlugins: Suggest to upgrade installed plugins per default Change-Id: I95d6f0d34bd72f809467fb7a74c93130e94b0de2
This commit is contained in:
@@ -112,17 +112,18 @@ public class InitPlugins implements InitStep {
|
||||
String pluginName = plugin.name;
|
||||
try {
|
||||
final Path tmpPlugin = plugin.pluginPath;
|
||||
Path p = site.plugins_dir.resolve(plugin.name + ".jar");
|
||||
boolean upgrade = Files.exists(p);
|
||||
|
||||
if (!(initFlags.installPlugins.contains(pluginName) || ui.yesno(false,
|
||||
if (!(initFlags.installPlugins.contains(pluginName) || ui.yesno(upgrade,
|
||||
"Install plugin %s version %s", pluginName, plugin.version))) {
|
||||
Files.deleteIfExists(tmpPlugin);
|
||||
continue;
|
||||
}
|
||||
|
||||
final Path p = site.plugins_dir.resolve(plugin.name + ".jar");
|
||||
if (Files.exists(p)) {
|
||||
if (upgrade) {
|
||||
final String installedPluginVersion = getVersion(p);
|
||||
if (!ui.yesno(false,
|
||||
if (!ui.yesno(upgrade,
|
||||
"version %s is already installed, overwrite it",
|
||||
installedPluginVersion)) {
|
||||
Files.deleteIfExists(tmpPlugin);
|
||||
|
||||
Reference in New Issue
Block a user