From f2baf9b8dcabe1eb8c4e0ccec1f9d29fa55f9ffd Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Sat, 13 Mar 2021 18:41:31 -0500 Subject: [PATCH] Don't corrupt stdout on unit tests --- .../src/main/java/ca/uhn/fhir/cli/BaseApp.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java index 59fac0dc541..8b904feddee 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java @@ -185,7 +185,9 @@ public abstract class BaseApp { loggingConfigOff(); validateJavaVersion(); - AnsiConsole.systemInstall(); + if (System.getProperty("unit_test") != null) { + AnsiConsole.systemInstall(); + } // log version while the logging is off VersionUtil.getVersion();