mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2025-01-03 12:39:35 +00:00
fix: ansi sequence for node terminal in some cases
This commit is contained in:
parent
dce3b93aef
commit
1a16db6a5b
1 changed files with 1 additions and 7 deletions
|
@ -35,8 +35,7 @@ impl Helper {
|
||||||
use std::io::BufRead;
|
use std::io::BufRead;
|
||||||
let mut stdout = std::io::BufReader::new(reader).lines();
|
let mut stdout = std::io::BufReader::new(reader).lines();
|
||||||
|
|
||||||
// // Run a ANSI escape sequence filter for the first few lines.
|
// Run a ANSI escape sequence filter.
|
||||||
let mut i = 0;
|
|
||||||
while let Some(Ok(line)) = stdout.next() {
|
while let Some(Ok(line)) = stdout.next() {
|
||||||
let line = strip_ansi_escapes::strip_str(line);
|
let line = strip_ansi_escapes::strip_str(line);
|
||||||
if let Err(e) = writeln!(lock!(output_parse), "{}", line) {
|
if let Err(e) = writeln!(lock!(output_parse), "{}", line) {
|
||||||
|
@ -45,11 +44,6 @@ impl Helper {
|
||||||
if let Err(e) = writeln!(lock!(output_pub), "{}", line) {
|
if let Err(e) = writeln!(lock!(output_pub), "{}", line) {
|
||||||
error!("Node PTY Pub | Output error: {}", e);
|
error!("Node PTY Pub | Output error: {}", e);
|
||||||
}
|
}
|
||||||
if i > 20 {
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
i += 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
while let Some(Ok(line)) = stdout.next() {
|
while let Some(Ok(line)) = stdout.next() {
|
||||||
if let Err(e) = writeln!(lock!(output_parse), "{}", line) {
|
if let Err(e) = writeln!(lock!(output_parse), "{}", line) {
|
||||||
|
|
Loading…
Reference in a new issue