mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 03:12:25 +01:00
Make grep-cli optional dependency
This commit is contained in:
@@ -229,7 +229,7 @@ fn invoke_bugreport(app: &App) {
|
||||
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".
|
||||
|
||||
let report = bugreport!()
|
||||
let mut report = bugreport!()
|
||||
.info(SoftwareVersion::default())
|
||||
.info(OperatingSystem::default())
|
||||
.info(CommandLine::default())
|
||||
@@ -255,14 +255,13 @@ fn invoke_bugreport(app: &App) {
|
||||
.info(FileContent::new("Config file", config_file()))
|
||||
.info(CompileTimeInformation::default());
|
||||
|
||||
let mut report = if let Ok(resolved_path) = grep_cli::resolve_binary(pager) {
|
||||
report.info(CommandOutput::new(
|
||||
#[cfg(feature = "paging")]
|
||||
if let Ok(resolved_path) = grep_cli::resolve_binary(pager) {
|
||||
report = report.info(CommandOutput::new(
|
||||
"Less version",
|
||||
resolved_path,
|
||||
&["--version"],
|
||||
))
|
||||
} else {
|
||||
report
|
||||
};
|
||||
|
||||
report.print::<Markdown>();
|
||||
|
Reference in New Issue
Block a user