diff --git a/crates/packager/src/shell.rs b/crates/packager/src/shell.rs index b9d8bfb8..35b7b5c8 100644 --- a/crates/packager/src/shell.rs +++ b/crates/packager/src/shell.rs @@ -43,7 +43,7 @@ impl CommandExt for Command { if let Ok(0) = stdout.read_line(&mut buf) { break; } - tracing::debug!("{}", buf.strip_suffix('\n').unwrap_or_else(|| &buf)); + tracing::debug!("{}", &buf[0..buf.len() - 1]); lines.extend(buf.as_bytes()); } }); @@ -59,7 +59,7 @@ impl CommandExt for Command { if let Ok(0) = stderr.read_line(&mut buf) { break; } - tracing::debug!("{}", buf.strip_suffix('\n').unwrap_or_else(|| &buf)); + tracing::debug!("{}", &buf[0..buf.len() - 1]); lines.extend(buf.as_bytes()); } });