소스 검색

Add exit code to CLI failure termination message (#97004)

Add exit code to CLI failure termination message, to help with loopy diagnosis.
Chris Hegarty 2 년 전
부모
커밋
bdd38c6876
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      libs/cli/src/main/java/org/elasticsearch/cli/Command.java

+ 1 - 1
libs/cli/src/main/java/org/elasticsearch/cli/Command.java

@@ -114,7 +114,7 @@ public abstract class Command implements Closeable {
     protected void printUserException(Terminal terminal, UserException e) {
         if (e.getMessage() != null) {
             terminal.errorPrintln("");
-            terminal.errorPrintln(Terminal.Verbosity.SILENT, "ERROR: " + e.getMessage());
+            terminal.errorPrintln(Terminal.Verbosity.SILENT, "ERROR: " + e.getMessage() + ", with exit code " + e.exitCode);
         }
     }