Skip to content

Commit

Permalink
Rollup merge of #133196 - omnivagant:correct-less-r-flag, r=tgross35
Browse files Browse the repository at this point in the history
Make rustc --explain compatible with BusyBox less

busybox less does not support the -r flag and less(1) says:

  USE OF THE -r OPTION IS NOT RECOMMENDED.
  • Loading branch information
jhpratt authored Nov 20, 2024
2 parents c364ff7 + 6f8fe79 commit cd36973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ fn show_md_content_with_pager(content: &str, color: ColorConfig) {
let mut cmd = Command::new(&pager_name);
// FIXME: find if other pagers accept color options
let mut print_formatted = if pager_name == "less" {
cmd.arg("-r");
cmd.arg("-R");
true
} else {
["bat", "catbat", "delta"].iter().any(|v| *v == pager_name)
Expand Down

0 comments on commit cd36973

Please sign in to comment.