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); }