cargo_zng/res/built_in/warn.rs
1use super::*;
2
3const WARN_HELP: &str = "
4Print a warning message
5
6You can combine this with '.zr-rp' tool
7
8The request file:
9 source/warn.zr-warn.zr-rp
10 | ${ZR_APP}!
11
12Prints a warning with the value of ZR_APP
13";
14pub(super) fn warn() {
15 help(WARN_HELP);
16 let message = fs::read_to_string(path(ZR_REQUEST)).unwrap_or_else(|e| fatal!("{e}"));
17 println!("zng-res::warning={message}");
18}