mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-17 02:32:26 +01:00
Make less version check accept a path to the less binary
This commit is contained in:
@@ -63,7 +63,7 @@ impl OutputType {
|
||||
return Err(ErrorKind::InvalidPagerValueBat.into());
|
||||
}
|
||||
|
||||
let mut p = Command::new(pager.bin);
|
||||
let mut p = Command::new(&pager.bin);
|
||||
let args = pager.args;
|
||||
|
||||
if pager.kind == PagerKind::Less {
|
||||
@@ -92,7 +92,7 @@ impl OutputType {
|
||||
//
|
||||
// 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(&pager.bin) {
|
||||
None => {
|
||||
p.arg("--no-init");
|
||||
}
|
||||
|
Reference in New Issue
Block a user