From f7656bec17ed51389206f8044489d543971f419e Mon Sep 17 00:00:00 2001 From: Lord of Abyss <103809695+Abyss-lord@users.noreply.github.com> Date: Thu, 26 Dec 2024 11:09:39 +0800 Subject: [PATCH] [#5930] improvement(CLI): improve unknown tag output. (#5978) ### What changes were proposed in this pull request? Improve output when CLI add an unknown tags. ### Why are the changes needed? Fix: #5930 ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? local test --- .../main/java/org/apache/gravitino/cli/commands/TagEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagEntity.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagEntity.java index 55bb4b7f436..d2d1cbbe18f 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagEntity.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagEntity.java @@ -98,7 +98,7 @@ public void handle() { exitWithError(exp.getMessage()); } - String all = String.join(",", tagsToAdd); + String all = tagsToAdd.length == 0 ? "nothing" : String.join(",", tagsToAdd); System.out.println(entity + " now tagged with " + all); }