Write warning to >&2 instead of /dev/stderr

Writing to /dev/stderr with > or >> does not work properly in a mock chroot.

https://bugzilla.redhat.com/show_bug.cgi?id=1965470

Related: rhbz#1950291
This commit is contained in:
Major Hayden 2021-05-27 18:42:37 +00:00 committed by Miro Hrončok
parent 2c0257dc43
commit 9eb47b5d06

View File

@ -54,7 +54,7 @@ for site_dir in ${site_dirs[@]}; do
done
lines=$(wc -l %{pyproject_ghost_distinfo} | cut -f1 -d" ")
if [ $lines -ne 1 ]; then
echo -e "\\n\\nWARNING: %%%%pyproject_extras_subpkg won't work without explicit -i or -F, found $lines dist-info directories.\\n\\n" >/dev/stderr
echo -e "\\n\\nWARNING: %%%%pyproject_extras_subpkg won't work without explicit -i or -F, found $lines dist-info directories.\\n\\n" >&2
rm %{pyproject_ghost_distinfo} # any attempt to use this will fail
fi
}