mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Merge pull request #4158 from HackToday/master
Check curl before use it
This commit is contained in:
commit
a840c20939
@ -24,7 +24,13 @@ kube::util::wait_for_url() {
|
|||||||
local wait=${3:-0.2}
|
local wait=${3:-0.2}
|
||||||
local times=${4:-10}
|
local times=${4:-10}
|
||||||
|
|
||||||
|
which curl >/dev/null || {
|
||||||
|
kube::log::usage "curl must be installed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
local i
|
local i
|
||||||
|
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user