Skip to content

Commit 93d4647

Browse files
author
Pierre Gradot
committed
Exit if a preprocessor command is not found
1 parent 4b266f1 commit 93d4647

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/preprocess/cmd.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::{Preprocessor, PreprocessorContext};
22
use crate::book::Book;
33
use crate::errors::*;
4-
use log::{debug, trace, warn};
4+
use log::{debug, error, trace, warn};
55
use shlex::Shlex;
66
use std::io::{self, Read, Write};
77
use std::process::{Child, Command, Stdio};
@@ -164,11 +164,11 @@ impl Preprocessor for CmdPreprocessor {
164164

165165
if let Err(ref e) = outcome {
166166
if e.kind() == io::ErrorKind::NotFound {
167-
warn!(
168-
"The command wasn't found, is the \"{}\" preprocessor installed?",
169-
self.name
167+
error!(
168+
"The command {} wasn't found, is the \"{}\" preprocessor installed?",
169+
self.cmd, self.name
170170
);
171-
warn!("\tCommand: {}", self.cmd);
171+
std::process::exit(1);
172172
}
173173
}
174174

0 commit comments

Comments
 (0)