mirror of
https://github.com/sharkdp/bat
synced 2026-07-31 18:21:43 +00:00
Use less binary specified in bat config for --diagnostic
This commit is contained in:
+3
-1
@@ -229,6 +229,8 @@ fn run() -> Result<bool> {
|
||||
|
||||
if app.matches.is_present("diagnostic") {
|
||||
use bugreport::{bugreport, collector::*, format::Markdown};
|
||||
let pager = bat::config::get_pager_executable(app.matches.value_of("pager"))
|
||||
.unwrap_or("less".to_owned()); // FIXME: Avoid non-canonical path to "less".
|
||||
|
||||
bugreport!()
|
||||
.info(SoftwareVersion::default())
|
||||
@@ -252,7 +254,7 @@ fn run() -> Result<bool> {
|
||||
]))
|
||||
.info(FileContent::new("Config file", config_file()))
|
||||
.info(CompileTimeInformation::default())
|
||||
.info(CommandOutput::new("Less version", "less", &["--version"]))
|
||||
.info(CommandOutput::new("Less version", pager, &["--version"]))
|
||||
.print::<Markdown>();
|
||||
|
||||
return Ok(true);
|
||||
|
||||
Reference in New Issue
Block a user