Compare commits
3 Commits
4-make-ser
...
feature/2-
| Author | SHA1 | Date | |
|---|---|---|---|
| 131bf15240 | |||
| fd1fe0d896 | |||
| 5996db8d80 |
@@ -12,9 +12,13 @@ fn exec_command(command: &mut process::Command) -> Result<(), String> {
|
||||
}
|
||||
} else {
|
||||
println!("{}", result.unwrap_err());
|
||||
return Err(
|
||||
"asciidoctor not installed. For more information run docki health!".to_string(),
|
||||
);
|
||||
|
||||
let binary_name = command.get_program().to_str().unwrap_or("Something is");
|
||||
|
||||
return Err(format!(
|
||||
"{} not installed. For more information run docki health!",
|
||||
binary_name
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,11 +35,11 @@ fn asciidoctor_docs(in_path: &str, out_path: &str) -> process::Command {
|
||||
fn asciidoctor_slides(in_path: &str, out_path: &str, offline_reveal: bool) -> process::Command {
|
||||
let mut command = process::Command::new(format!("asciidoctor-revealjs"));
|
||||
let out_dir = parent_path(out_path);
|
||||
let revealjs_path = if offline_reveal {
|
||||
path_between(out_dir.to_string(), "./dist/slides/revealjs".to_string())
|
||||
} else {
|
||||
"https://cdn.jsdelivr.net/npm/reveal.js@5.2.1".to_string()
|
||||
};
|
||||
let revealjs_path = if offline_reveal {
|
||||
path_between(out_dir.to_string(), "./dist/slides/revealjs".to_string())
|
||||
} else {
|
||||
"https://cdn.jsdelivr.net/npm/reveal.js@5.2.1".to_string()
|
||||
};
|
||||
|
||||
command
|
||||
.arg(format!("{in_path}"))
|
||||
|
||||
Reference in New Issue
Block a user