summaryrefslogtreecommitdiff
path: root/src/utils/bat/output.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2024-11-14 21:24:00 -0500
committerGitHub <noreply@github.com>2024-11-14 21:24:00 -0500
commitd0ec139c3202167e5041758344d9bd2f5cfb5945 (patch)
treef706ecdb41dff84fa023f126abcf9e18d0b84c57 /src/utils/bat/output.rs
parent1fb6f99ec498150f552c1c8b5440152c0c2aade7 (diff)
Honor pager path when checking less version (#1903)
Diffstat (limited to 'src/utils/bat/output.rs')
-rw-r--r--src/utils/bat/output.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/bat/output.rs b/src/utils/bat/output.rs
index a9cb1e4..747abc7 100644
--- a/src/utils/bat/output.rs
+++ b/src/utils/bat/output.rs
@@ -178,7 +178,7 @@ fn _make_process_from_less_path(
config: &PagerCfg,
) -> Option<Command> {
if let Ok(less_path) = grep_cli::resolve_binary(less_path) {
- let mut p = Command::new(less_path);
+ let mut p = Command::new(less_path.clone());
if args.is_empty() || replace_arguments_to_less {
p.args(vec!["--RAW-CONTROL-CHARS"]);
@@ -189,7 +189,7 @@ fn _make_process_from_less_path(
//
// For newer versions (530 or 558 on Windows), we omit '--no-init' as it
// is not needed anymore.
- match retrieve_less_version() {
+ match retrieve_less_version(less_path) {
None => {
p.arg("--no-init");
}