Send eerror and ewarn messages to stderr. This is important in
authorZac Medico <zmedico@gentoo.org>
Fri, 4 Jan 2008 20:49:05 +0000 (20:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 4 Jan 2008 20:49:05 +0000 (20:49 -0000)
case somebody calls portageq inside a global scope command
substitution. The output needs to go to stderr so that the
die message from the subshell is visible.

svn path=/main/trunk/; revision=9140

bin/isolated-functions.sh

index d7218b92fd6d80026e1577dcee14ba40c904336b..e5f65e6983964650b952774cbb629c0ed8485d19 100755 (executable)
@@ -214,7 +214,7 @@ einfon() {
 ewarn() {
        elog_base WARN "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
-       echo -e " ${WARN}*${NORMAL} ${RC_INDENTATION}$*"
+       echo -e " ${WARN}*${NORMAL} ${RC_INDENTATION}$*" >&2
        LAST_E_CMD="ewarn"
        return 0
 }
@@ -222,7 +222,7 @@ ewarn() {
 eerror() {
        elog_base ERROR "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
-       echo -e " ${BAD}*${NORMAL} ${RC_INDENTATION}$*"
+       echo -e " ${BAD}*${NORMAL} ${RC_INDENTATION}$*" >&2
        LAST_E_CMD="eerror"
        return 0
 }