This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-committer-cli.git
The following commit(s) were added to refs/heads/master by this push:
new 354d1a7 SLING-9539 - Release listing broken by newlines in repo
descriptions
354d1a7 is described below
commit 354d1a7ac9a87b2927f6baad69f92235015a6198
Author: Robert Munteanu <[email protected]>
AuthorDate: Mon Jun 22 14:02:40 2020 +0200
SLING-9539 - Release listing broken by newlines in repo descriptions
Cleanup newlines from staging repository description.
---
src/main/java/org/apache/sling/cli/impl/release/ListCommand.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/cli/impl/release/ListCommand.java
b/src/main/java/org/apache/sling/cli/impl/release/ListCommand.java
index 0b48265..7773bea 100644
--- a/src/main/java/org/apache/sling/cli/impl/release/ListCommand.java
+++ b/src/main/java/org/apache/sling/cli/impl/release/ListCommand.java
@@ -40,6 +40,10 @@ public class ListCommand implements Command {
static final String NAME = "list";
private final Logger logger = LoggerFactory.getLogger(getClass());
+
+ private static String cleanupNewlines(String input) {
+ return input.replace('\n', ' ');
+ }
@Reference
private RepositoryService repositoryService;
@@ -47,10 +51,9 @@ public class ListCommand implements Command {
@Override
public void run() {
try {
- repositoryService.list().forEach( r -> logger.info("{}\t{}",
r.getRepositoryId(), r.getDescription()));
+ repositoryService.list().forEach( r -> logger.info("{}\t{}",
r.getRepositoryId(), cleanupNewlines(r.getDescription())));
} catch (IOException e) {
logger.warn("Failed executing command", e);
}
}
-
}