From 222c714cf6e618130d286fbb5487bb83f5ec00a8 Mon Sep 17 00:00:00 2001 From: Kennan Date: Thu, 5 Feb 2015 16:31:02 +0800 Subject: [PATCH 1/2] Check curl before use it This check can help user figure out what's the issue during local cluster setup --- hack/lib/util.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 4364dffc1d7..ff46bad7ef8 100644 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -25,6 +25,12 @@ kube::util::wait_for_url() { local times=${4:-10} local i + + which curl >/dev/null || { + kube::log::usage "curl must be installed" + exit 1 + } + for i in $(seq 1 $times); do local out if out=$(curl -fs $url 2>/dev/null); then From eaab84a414bad8384b6cfe4b0d64dbda56ce04c0 Mon Sep 17 00:00:00 2001 From: Kennan Date: Thu, 5 Feb 2015 16:31:02 +0800 Subject: [PATCH 2/2] Check curl before use it This check can help user figure out what's the issue during local cluster setup --- hack/lib/util.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 4364dffc1d7..ff46bad7ef8 100644 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -25,6 +25,12 @@ kube::util::wait_for_url() { local times=${4:-10} local i + + which curl >/dev/null || { + kube::log::usage "curl must be installed" + exit 1 + } + for i in $(seq 1 $times); do local out if out=$(curl -fs $url 2>/dev/null); then