adjust error message on failed formatting
This commit is contained in:
@@ -9,7 +9,7 @@ use std::fs;
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::{self, Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
|
|
||||||
fn find_prolog_files(libraries: &mut File, prefix: &str, current_dir: &Path) {
|
fn find_prolog_files(libraries: &mut File, prefix: &str, current_dir: &Path) {
|
||||||
let entries = match current_dir.read_dir() {
|
let entries = match current_dir.read_dir() {
|
||||||
@@ -103,13 +103,11 @@ fn format_generated_file(path: &Path) {
|
|||||||
.arg(path.as_os_str())
|
.arg(path.as_os_str())
|
||||||
.spawn()
|
.spawn()
|
||||||
.unwrap_or_else(|err| {
|
.unwrap_or_else(|err| {
|
||||||
eprintln!(
|
panic!(
|
||||||
"{}: rustfmt (https://github.com/rust-lang/rustfmt) \
|
"{}: rustfmt was detected as available, but failed to format generated file '{}'",
|
||||||
is required build time dependency and must be available \
|
err,
|
||||||
in the environment's PATH variable.",
|
path.display()
|
||||||
err
|
|
||||||
);
|
);
|
||||||
process::exit(1);
|
|
||||||
})
|
})
|
||||||
.wait()
|
.wait()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user