summaryrefslogtreecommitdiffstats
path: root/src/search.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.rs')
-rw-r--r--src/search.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/search.rs b/src/search.rs
index 149f67c3..c866b4bf 100644
--- a/src/search.rs
+++ b/src/search.rs
@@ -396,7 +396,19 @@ impl<W: WriteColor> SearchWorker<W> {
let mut cmd = Command::new(&bin);
cmd.arg(path).stdin(Stdio::from(File::open(path)?));
- let rdr = self.command_builder.build(&mut cmd)?;
+ let rdr = self
+ .command_builder
+ .build(&mut cmd)
+ .map_err(|err| {
+ io::Error::new(
+ io::ErrorKind::Other,
+ format!(
+ "preprocessor command could not start: '{:?}': {}",
+ cmd,
+ err,
+ ),
+ )
+ })?;
self.search_reader(path, rdr).map_err(|err| {
io::Error::new(
io::ErrorKind::Other,