Skip to content
Myr

Merge pull request #2106 from tmccombs/fix-error-newlines

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thayne McCombs · committed by GitHub · parents cdea7f5, a3942db · Browse files · 2 files+3 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • fix: don't sanitize error message

Diff stats

2 files+3 added−9 removed

  • other:+3 added−9 removed

2 files+3 added−9 removed

modified:src/error.rs+2 added-8 removed
1use std::io::IsTerminal;23use crate::sanitize::maybe_sanitize;45pub fn print_error(msg: impl Into<String>) {6 let msg = msg.into();7 let safe = maybe_sanitize(&msg, std::io::stderr().is_terminal());8 eprintln!("[fd error]: {safe}");1pub fn print_error(msg: impl std::fmt::Display) {2 eprintln!("[fd error]: {msg}");3}
modified:CHANGELOG.md+1 added-1 removed
2 unmodified lines
3## Features4-56## Bugfixes7-7- Don't incorrectly escape newlines in error messages, see #210489# 10.5.01011## Features
865 unmodified lines