mirror of
https://github.com/FliegendeWurst/ripgrep-all.git
synced 2024-11-24 12:24:56 +00:00
fix error message on missing rg
This commit is contained in:
parent
209685d588
commit
e72d9c607b
@ -1,10 +1,12 @@
|
|||||||
use clap::{crate_version, App, Arg};
|
use clap::{crate_version, App, Arg};
|
||||||
|
use failure::Fallible;
|
||||||
use log::*;
|
use log::*;
|
||||||
|
use rga::adapters::spawning::map_exe_error;
|
||||||
use rga::adapters::*;
|
use rga::adapters::*;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
fn main() -> std::io::Result<()> {
|
fn main() -> Fallible<()> {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
let mut app = App::new(env!("CARGO_PKG_NAME"))
|
let mut app = App::new(env!("CARGO_PKG_NAME"))
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
@ -99,7 +101,8 @@ fn main() -> std::io::Result<()> {
|
|||||||
.arg("--pre-glob")
|
.arg("--pre-glob")
|
||||||
.arg(format!("*.{{{}}}", extensions))
|
.arg(format!("*.{{{}}}", extensions))
|
||||||
.args(passthrough_args)
|
.args(passthrough_args)
|
||||||
.spawn()?;
|
.spawn()
|
||||||
|
.map_err(|e| map_exe_error(e, "rg", "Please make sure you have ripgrep installed."))?;
|
||||||
|
|
||||||
child.wait()?;
|
child.wait()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user