Merge "Add ui messages about updating or installing each plugin using pgm init"
This commit is contained in:
commit
92ba0dd270
@ -132,9 +132,8 @@ public class InitPlugins implements InitStep {
|
||||
|
||||
if (upgrade) {
|
||||
final String installedPluginVersion = getVersion(p);
|
||||
if (!ui.yesno(upgrade,
|
||||
"version %s is already installed, overwrite it",
|
||||
installedPluginVersion)) {
|
||||
if (!ui.yesno(upgrade, "%s %s is already installed, overwrite it",
|
||||
plugin.name, installedPluginVersion)) {
|
||||
Files.deleteIfExists(tmpPlugin);
|
||||
continue;
|
||||
}
|
||||
@ -147,6 +146,12 @@ public class InitPlugins implements InitStep {
|
||||
}
|
||||
try {
|
||||
Files.move(tmpPlugin, p);
|
||||
if (upgrade) {
|
||||
// or update that is not an upgrade
|
||||
ui.message("Updated %s to %s\n", plugin.name, plugin.version);
|
||||
} else {
|
||||
ui.message("Installed %s %s\n", plugin.name, plugin.version);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new IOException("Failed to install plugin " + pluginName
|
||||
+ ": " + tmpPlugin.toAbsolutePath() + " -> "
|
||||
|
Loading…
Reference in New Issue
Block a user