summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Aistleitner <christian@quelltextlich.at>2020-05-31 11:07:34 +0200
committerChristian Aistleitner <christian@quelltextlich.at>2020-07-03 13:57:59 +0200
commit99dd23233420e6c9bf919990b42a572111cf44fb (patch)
treefd9f7ad600266d9aa63a9b2537123dda27604810
parentc3afed68787074c51bb3360414cf0f84b6f27642 (diff)
Add Api version to `plugin ls` Ssh command text format
-rw-r--r--java/com/google/gerrit/sshd/commands/PluginLsCommand.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/java/com/google/gerrit/sshd/commands/PluginLsCommand.java b/java/com/google/gerrit/sshd/commands/PluginLsCommand.java
index 15142bd982..4effa3aeba 100644
--- a/java/com/google/gerrit/sshd/commands/PluginLsCommand.java
+++ b/java/com/google/gerrit/sshd/commands/PluginLsCommand.java
@@ -49,15 +49,17 @@ public class PluginLsCommand extends SshCommand {
.toJson(output, new TypeToken<Map<String, PluginInfo>>() {}.getType(), stdout);
stdout.print('\n');
} else {
- stdout.format("%-30s %-10s %-8s %s\n", "Name", "Version", "Status", "File");
+ String template = "%-30s %-10s %-16s %-8s %s\n";
+ stdout.format(template, "Name", "Version", "Api-Version", "Status", "File");
stdout.print(
"-------------------------------------------------------------------------------\n");
for (Map.Entry<String, PluginInfo> p : output.entrySet()) {
PluginInfo info = p.getValue();
stdout.format(
- "%-30s %-10s %-8s %s\n",
+ template,
p.getKey(),
Strings.nullToEmpty(info.version),
+ Strings.nullToEmpty(info.apiVersion),
status(info.disabled),
Strings.nullToEmpty(info.filename));
}