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
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "Operation timed out" >&2
|
echo "error: operation timed out" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,19 +68,19 @@ do
|
|||||||
usage 0
|
usage 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echoerr "Unknown argument: $1"
|
echoerr "unknown argument: $1"
|
||||||
usage 1
|
usage 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if ! [ -x "$(command -v nc)" ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WAITFOR_HOST" = "" ] || [ "$WAITFOR_PORT" = "" ]; then
|
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
|
usage 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user