Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ESC character from the end of run log entries #297

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Conversation

uarlouski
Copy link
Member

No description provided.

@@ -78,7 +78,7 @@ public CompletableFuture<Object> execute()
IStreamMonitor streamMonitor = launchProcess.getStreamsProxy().getOutputStreamMonitor();
streamMonitor.addListener((text, montor) ->
{
String messsage = removeEnd(text, "[m");
String messsage = removeEnd(text, "\033[m");
messsage = removeStart(messsage, "\033");
messsage = messsage.replaceFirst("^\\[..+?m", "").strip();
Copy link
Member

@ikalinin1 ikalinin1 Jan 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^\\[..+?m -> could be converted to ^\\[\\d+m

Copy link
Member

@ikalinin1 ikalinin1 Jan 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or even ^\\[\\d{0,}m

@uarlouski uarlouski merged commit 208427a into master Jan 3, 2023
@uarlouski uarlouski deleted the escape branch January 3, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants