chore(ci): quiet the warnings when verifying the generated header file (#2507)

This commit is contained in:
Sean McArthur
2021-04-20 17:23:10 -07:00
committed by GitHub
parent 11345394d9
commit 117cc492a6

View File

@@ -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 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 # 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. # 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 fi
# Replace the previous copy with the single expanded file # Replace the previous copy with the single expanded file