Commit eaab84a4 authored by Kennan's avatar Kennan

Check curl before use it

This check can help user figure out what's the issue during local cluster setup
parent 5de2e916
...@@ -25,6 +25,12 @@ kube::util::wait_for_url() { ...@@ -25,6 +25,12 @@ kube::util::wait_for_url() {
local times=${4:-10} local times=${4:-10}
local i local i
which curl >/dev/null || {
kube::log::usage "curl must be installed"
exit 1
}
for i in $(seq 1 $times); do for i in $(seq 1 $times); do
local out local out
if out=$(curl -fs $url 2>/dev/null); then if out=$(curl -fs $url 2>/dev/null); then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment