From a7f1eda3280d4919c8da977674d4881ddf883929 Mon Sep 17 00:00:00 2001
From: Takashi Yoshi <takashi@yoshi.email>
Date: Fri, 7 Dec 2018 16:56:36 +0100
Subject: [PATCH] [type/__package_emerge] Send error messages to stderr

---
 cdist/conf/type/__package_emerge/gencode-remote | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cdist/conf/type/__package_emerge/gencode-remote b/cdist/conf/type/__package_emerge/gencode-remote
index c25f2be7..b144ede4 100755
--- a/cdist/conf/type/__package_emerge/gencode-remote
+++ b/cdist/conf/type/__package_emerge/gencode-remote
@@ -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"