From 117cc492a62c4051c75e7eec0f624b30db8a20e5 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Tue, 20 Apr 2021 17:23:10 -0700 Subject: [PATCH] chore(ci): quiet the warnings when verifying the generated header file (#2507) --- capi/gen_header.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/capi/gen_header.sh b/capi/gen_header.sh index 9319857d97..a4460c6295 100755 --- a/capi/gen_header.sh +++ b/capi/gen_header.sh @@ -74,7 +74,15 @@ cd "${WORK_DIR}" || exit 2 if ! output=$(RUSTFLAGS='--cfg hyper_unstable_ffi' cargo rustc -- -Z unstable-options --pretty=expanded 2>&1 > expanded.rs); then # As of April 2021 the script above prints a lot of warnings/errors, and # exits with a nonzero return code, but hyper.h still gets generated. - echo "$output" + # + # However, on Github Actions, this will result in automatic "annotations" + # being added to files not related to a PR, so if this is `--verify` mode, + # then don't show it. + # + # But yes show it when using it locally. + if [[ "--verify" != "$1" ]]; then + echo "$output" + fi fi # Replace the previous copy with the single expanded file