[type/__package_emerge] Send error messages to stderr

This commit is contained in:
Takashi Yoshi 2018-12-07 16:56:36 +01:00
parent ccdbf1a31c
commit a7f1eda328

View file

@ -39,12 +39,12 @@ pkg_version="$(cat "$__object/explorer/pkg_version")"
if [ -z "$pkg_version" ]; then
state_is="absent"
elif [ -z "$version" ] && [ "$(echo "$pkg_version" | wc -l)" -gt 1 ]; then
echo "Package name is not unique! The following packages are installed:"
echo "$pkg_version"
echo "Package name is not unique! The following packages are installed:" >&2
echo "$pkg_version" >&2
exit 1
elif [ -n "$version" ] && [ "$(echo "$pkg_version" | cut -d " " -f 1 | sort | uniq | wc -l)" -gt 1 ]; then
echo "Package name is not unique! The following packages are installed:"
echo "$pkg_version"
echo "Package name is not unique! The following packages are installed:" >&2
echo "$pkg_version" >&2
exit 1
else
state_is="present"