Fix error to stderr

This commit is contained in:
Kevin MacMartin 2015-02-02 08:59:48 -05:00
parent 6d7176688e
commit 719a8e77a6

View file

@ -69,9 +69,9 @@ function buildhosts_help(){
# Error function: display error then exit unsuccessfully
function buildhosts_error() {
printf "$c_heading $c_fail%s$c_fail %s$c_reset\n" ' ! ERROR:' "$1" 2>&1
printf "$c_heading $c_fail%s$c_fail %s$c_reset\n" ' ! ERROR:' "$1" >&2
[[ "$2" -eq 1 ]] && {
printf '\n'
printf '\n' >&2
buildhosts_help
}
exit 1