mirror of
https://github.com/thegeeklab/wait-for.git
synced 2024-11-22 04:10:40 +00:00
format error messages
This commit is contained in:
parent
71def01f9d
commit
d17c23172a
8
wait-for
8
wait-for
@ -35,7 +35,7 @@ wait_for() {
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
echo "Operation timed out" >&2
|
||||
echo "error: operation timed out" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -68,19 +68,19 @@ do
|
||||
usage 0
|
||||
;;
|
||||
*)
|
||||
echoerr "Unknown argument: $1"
|
||||
echoerr "unknown argument: $1"
|
||||
usage 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! [ -x "$(command -v nc)" ]; then
|
||||
echoerr "Error: netcat is required for wait-for to run."
|
||||
echoerr "error: netcat is required for wait-for to run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$WAITFOR_HOST" = "" ] || [ "$WAITFOR_PORT" = "" ]; then
|
||||
echoerr "Error: you need to provide a host and port to test."
|
||||
echoerr "error: you need to provide a host and port to test"
|
||||
usage 2
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user