Skip to content

Commit

Permalink
Remove needless trim
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 22, 2024
1 parent 590375e commit e08262a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ fn process_error(mut msg: String, status: Option<ExitStatus>, output: Option<&Ou

if let Some(out) = output {
match str::from_utf8(&out.stdout) {
Ok(s) if !s.trim().is_empty() => {
Ok(s) if !s.trim_start().is_empty() => {
msg.push_str("\n--- stdout\n");
msg.push_str(s);
}
Ok(_) | Err(_) => {}
}
match str::from_utf8(&out.stderr) {
Ok(s) if !s.trim().is_empty() => {
Ok(s) if !s.trim_start().is_empty() => {
msg.push_str("\n--- stderr\n");
msg.push_str(s);
}
Expand Down

0 comments on commit e08262a

Please sign in to comment.