Skip to content

Commit 117cc49

Browse files
authored
chore(ci): quiet the warnings when verifying the generated header file (#2507)
1 parent 1134539 commit 117cc49

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

capi/gen_header.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,15 @@ cd "${WORK_DIR}" || exit 2
7474
if ! output=$(RUSTFLAGS='--cfg hyper_unstable_ffi' cargo rustc -- -Z unstable-options --pretty=expanded 2>&1 > expanded.rs); then
7575
# As of April 2021 the script above prints a lot of warnings/errors, and
7676
# exits with a nonzero return code, but hyper.h still gets generated.
77-
echo "$output"
77+
#
78+
# However, on Github Actions, this will result in automatic "annotations"
79+
# being added to files not related to a PR, so if this is `--verify` mode,
80+
# then don't show it.
81+
#
82+
# But yes show it when using it locally.
83+
if [[ "--verify" != "$1" ]]; then
84+
echo "$output"
85+
fi
7886
fi
7987

8088
# Replace the previous copy with the single expanded file

0 commit comments

Comments
 (0)