Support for IPv6 addresses

Author: joel0Created Jul 13, 2022Updated May 30, 2024

wait-for-it mangles IPv6 address literals by considering the first : as the end of the host field.

$ ./wait-for-it.sh "[2607:f8b0:400e:c08::66]:80"
wait-for-it.sh: waiting 15 seconds for [2607:f8b0
wait-for-it.sh: timeout occurred after waiting 15 seconds for [2607:f8b0

$ ./wait-for-it.sh "[::1]"
wait-for-it.sh: waiting 15 seconds for [:1]
wait-for-it.sh: timeout occurred after waiting 15 seconds for [:1]