mrako / wait-for

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check if nc is available or give a helpful error

elferink opened this issue · comments

When nc is not available you get an "Operation timed out", it should preferrably give a helpful error.

commented

Also, there are a few versions of netcat floating around. Notably, the current release of CentOS, and so probably RHEL, use a version without a -z that tests for connectivity. Not sure what the best solution is.. For now, I have a suitable version of curl everywhere I need wait-for. I just replaced the netcat call with:

curl --silent --max-time 2 $HOST:$PORT 2>&1 1>/dev/null
commented

eficode#6 has a fix for this as well