From ec33164686c431d90f0a43049ebd46c35d84cc67 Mon Sep 17 00:00:00 2001 From: "henry.nash@uk.ibm.com" Date: Mon, 5 Dec 2016 06:36:30 -0800 Subject: [PATCH] Prevent SIGPIPE errors causing the version check line to fail The use of pipe when process the version command can lead to 141 failues on some systems. Using a prefix of tail can prevent this. --- hack/lib/etcd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index b32f2113e28..07b678edb6e 100644 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -32,7 +32,7 @@ kube::etcd::start() { exit 1 fi - version=$(etcd --version | head -n 1 | cut -d " " -f 3) + version=$(etcd --version | tail -n +1 | head -n 1 | cut -d " " -f 3) if [[ "${version}" < "${ETCD_VERSION}" ]]; then kube::log::usage "etcd version ${ETCD_VERSION} or greater required." kube::log::info "You can use 'hack/install-etcd.sh' to install a copy in third_party/."