Suppress error message from grep by removing in the end as it is wrongly interpreted as a file.

pull/8/head
Jing Ai 2018-03-16 18:12:39 -07:00
parent 977252d4b2
commit 384868e570
1 changed files with 1 additions and 1 deletions

View File

@ -1713,7 +1713,7 @@ function create-subnetworks() {
--secondary-range "services-default=${SERVICE_CLUSTER_IP_RANGE}"
echo "Created subnetwork ${IP_ALIAS_SUBNETWORK}"
else
if ! echo ${subnet} | grep -qs secondaryIpRanges ${subnet} 2>/dev/null; then
if ! echo ${subnet} | grep --quiet secondaryIpRanges; then
echo "${color_red}Subnet ${IP_ALIAS_SUBNETWORK} does not have a secondary range${color_norm}"
exit 1
fi