Skip to content

Commit

Permalink
Merge pull request #45008 from gsmet/improve-network-output
Browse files Browse the repository at this point in the history
Improve Dev Services network output in dev mode when typing c
  • Loading branch information
gastaldi authored Dec 10, 2024
2 parents 9309c28 + ebd69b0 commit 0c0bd93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public String formatPorts() {
return Arrays.stream(getExposedPorts())
.filter(p -> p.getPublicPort() != null)
.map(c -> c.getIp() + ":" + c.getPublicPort() + "->" + c.getPrivatePort() + "/" + c.getType())
.collect(Collectors.joining(" ,"));
.collect(Collectors.joining(", "));
}

public static class ContainerPort {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ private static String[] getNetworks(Container container) {
return networks.entrySet().stream()
.map(e -> {
List<String> aliases = e.getValue().getAliases();
if (aliases == null) {
if (aliases == null || aliases.isEmpty()) {
return e.getKey();
}
return e.getKey() + " (" + String.join(",", aliases) + ")";
return e.getKey() + " (" + String.join(", ", aliases) + ")";
})
.toArray(String[]::new);
}
Expand Down

0 comments on commit 0c0bd93

Please sign in to comment.