From 0594be864b5ca0c95f27628a27f208548799e0b9 Mon Sep 17 00:00:00 2001 From: Luca Stocchi Date: Tue, 19 Jul 2022 11:22:31 +0200 Subject: [PATCH] fix: add ansi escape chars handling to process handler Signed-off-by: Luca Stocchi --- .../intellij/common/utils/ExecProcessHandler.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/redhat/devtools/intellij/common/utils/ExecProcessHandler.java b/src/main/java/com/redhat/devtools/intellij/common/utils/ExecProcessHandler.java index 5aba094..1fcec43 100644 --- a/src/main/java/com/redhat/devtools/intellij/common/utils/ExecProcessHandler.java +++ b/src/main/java/com/redhat/devtools/intellij/common/utils/ExecProcessHandler.java @@ -10,16 +10,15 @@ ******************************************************************************/ package com.redhat.devtools.intellij.common.utils; -import com.intellij.execution.process.KillableProcessHandler; -import com.intellij.execution.process.OSProcessHandler; +import com.intellij.execution.process.KillableColoredProcessHandler; import com.intellij.util.io.BaseDataReader; import com.intellij.util.io.BaseOutputReader; +import org.jetbrains.annotations.NotNull; + import java.io.Reader; import java.nio.charset.Charset; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -public class ExecProcessHandler extends KillableProcessHandler { +public class ExecProcessHandler extends KillableColoredProcessHandler { /** * @@ -27,7 +26,7 @@ public class ExecProcessHandler extends KillableProcessHandler { * @param commandLine must not be empty (for correct thread attribution in the stacktrace) * @param charset charset */ - public ExecProcessHandler(@NotNull Process process, /*@NotNull*/ String commandLine, @Nullable Charset charset) { + public ExecProcessHandler(@NotNull Process process, /*@NotNull*/ String commandLine, @NotNull Charset charset) { super(process, commandLine, charset); } @@ -67,4 +66,4 @@ protected Reader createProcessOutReader() { protected Reader createProcessErrReader() { return new ExecReader(myProcess.getErrorStream()); } -} \ No newline at end of file +}