mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-22 06:16:31 +00:00
Display errors on stderr
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
die () {
|
||||
if [ -z "$1" ]; then
|
||||
exit 1
|
||||
if [ -n "$1" ]; then
|
||||
>&2 echo -n $(tput setaf 1)
|
||||
>&2 echo -e "$1"
|
||||
>&2 echo -n $(tput sgr0)
|
||||
fi
|
||||
echo -n $(tput setaf 1)
|
||||
echo -e "$1"
|
||||
echo -n $(tput sgr0)
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user