From 0611a3027b26e4c6a2dc9133aad4708633c4c36d Mon Sep 17 00:00:00 2001 From: Mario Alegre Date: Tue, 16 Feb 2021 16:03:38 -0500 Subject: [PATCH] pdm scripts now should send error messages to stderr instead of stdout --- .install/bin/pdm-build | 6 +++--- .install/bin/pdm-launch | 8 ++++---- .install/bin/pdm-shell | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.install/bin/pdm-build b/.install/bin/pdm-build index 5be974c..43baab2 100755 --- a/.install/bin/pdm-build +++ b/.install/bin/pdm-build @@ -9,9 +9,9 @@ epoch=$(date +%s.%3N) today=$(date +%Y-%m-%d-T%H%M) badarg() { - echo -n "$(basename $0): " - echo "$1" - echo "Try '$(basename $0) -h' for more information." + echo -n "$(basename $0): " >&2 + echo "$1" >&2 + echo "Try '$(basename $0) -h' for more information." >&2 exit 2 } diff --git a/.install/bin/pdm-launch b/.install/bin/pdm-launch index e2e2da3..696689c 100755 --- a/.install/bin/pdm-launch +++ b/.install/bin/pdm-launch @@ -3,9 +3,9 @@ set -eEuo pipefail badarg() { - echo -n "$(basename $0): " - echo "$1" - echo "Try '$(basename $0) -h' for more information." + echo -n "$(basename $0): " >&2 + echo "$1" >&2 + echo "Try '$(basename $0) -h' for more information." >&2 exit 2 } @@ -64,7 +64,7 @@ if [[ $opt_config -eq 1 ]]; then echo "Getting deploy options from image metadata label '$opt_label' ..." deployconf=$(podman image inspect -f "{{ .Config.Labels.${opt_label} }}" "$image") if [[ $deployconf == "" ]]; then - echo "Error: could not find image metadata label '$opt_label'" + echo "Error: could not find image metadata label '$opt_label'" >&2 exit 1 fi else diff --git a/.install/bin/pdm-shell b/.install/bin/pdm-shell index 54f7664..edaf36d 100755 --- a/.install/bin/pdm-shell +++ b/.install/bin/pdm-shell @@ -3,9 +3,9 @@ set -eEuo pipefail badarg() { - echo -n "$(basename $0): " - echo "$1" - echo "Try '$(basename $0) -h' for more information." + echo -n "$(basename $0): " >&2 + echo "$1" >&2 + echo "Try '$(basename $0) -h' for more information." >&2 exit 2 }