mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-15 07:10:43 +01:00
Use resolved path for --diagnostic as well
This commit is contained in:
parent
bf2b2df9c9
commit
3fa09dbe2e
@ -231,7 +231,7 @@ fn run() -> Result<bool> {
|
|||||||
let pager = bat::config::get_pager_executable(app.matches.value_of("pager"))
|
let pager = bat::config::get_pager_executable(app.matches.value_of("pager"))
|
||||||
.unwrap_or_else(|| "less".to_owned()); // FIXME: Avoid non-canonical path to "less".
|
.unwrap_or_else(|| "less".to_owned()); // FIXME: Avoid non-canonical path to "less".
|
||||||
|
|
||||||
bugreport!()
|
let report = bugreport!()
|
||||||
.info(SoftwareVersion::default())
|
.info(SoftwareVersion::default())
|
||||||
.info(OperatingSystem::default())
|
.info(OperatingSystem::default())
|
||||||
.info(CommandLine::default())
|
.info(CommandLine::default())
|
||||||
@ -253,9 +253,19 @@ fn run() -> Result<bool> {
|
|||||||
"MANPAGER",
|
"MANPAGER",
|
||||||
]))
|
]))
|
||||||
.info(FileContent::new("Config file", config_file()))
|
.info(FileContent::new("Config file", config_file()))
|
||||||
.info(CompileTimeInformation::default())
|
.info(CompileTimeInformation::default());
|
||||||
.info(CommandOutput::new("Less version", pager, &["--version"]))
|
|
||||||
.print::<Markdown>();
|
let mut report = if let Ok(resolved_path) = grep_cli::resolve_binary(pager) {
|
||||||
|
report.info(CommandOutput::new(
|
||||||
|
"Less version",
|
||||||
|
resolved_path,
|
||||||
|
&["--version"],
|
||||||
|
))
|
||||||
|
} else {
|
||||||
|
report
|
||||||
|
};
|
||||||
|
|
||||||
|
report.print::<Markdown>();
|
||||||
|
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user