cargo_zng/res/built_in/fail.rs
1use super::*;
2
3const FAIL_HELP: &str = "
4Print an error message and fail the build
5
6The request file:
7 some/dir/disallow.zr-fail.zr-rp
8 | Don't copy ${ZR_REQUEST_DD} with a glob!
9
10Prints an error message and fails the build if copied
11";
12pub(super) fn fail() {
13 help(FAIL_HELP);
14 let message = fs::read_to_string(ZR_REQUEST).unwrap_or_else(|e| fatal!("{e}"));
15 fatal!("{message}");
16}