File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function configure_proxy() {
1414 sudo test -e ${service_config} || sudo touch ${service_config}
1515 for env_var in http_proxy https_proxy no_proxy proxy_ca_bundle_path; do
1616 # delete line from file if specific proxy env var is unset
17- if sudo test -z ${! env_var} ; then
17+ if sudo test -z " ${! env_var:- } " ; then
1818 sudo sed -i " /^${env_var} =/d" ${service_config}
1919 # add proxy env var if it doesn't exist yet
2020 elif ! sudo grep -s -q ^" ${env_var} =" ${service_config} ; then
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ function configure_proxy() {
126126 sudo test -e ${service_config} || sudo touch ${service_config}
127127 for env_var in http_proxy https_proxy no_proxy proxy_ca_bundle_path; do
128128 # delete line from file if specific proxy env var is unset
129- if sudo test -z ${! env_var} ; then
129+ if sudo test -z " ${! env_var:- } " ; then
130130 sudo sed -i " /^${env_var} =/d" ${service_config}
131131 # add proxy env var if it doesn't exist yet
132132 elif ! sudo grep -s -q ^" ${env_var} =" ${service_config} ; then
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ function configure_proxy() {
126126 sudo test -e ${service_config} || sudo touch ${service_config}
127127 for env_var in http_proxy https_proxy no_proxy proxy_ca_bundle_path; do
128128 # delete line from file if specific proxy env var is unset
129- if sudo test -z ${! env_var} ; then
129+ if sudo test -z " ${! env_var:- } " ; then
130130 sudo sed -i " /^${env_var} =/d" ${service_config}
131131 # add proxy env var if it doesn't exist yet
132132 elif ! sudo grep -s -q ^" ${env_var} =" ${service_config} ; then
You can’t perform that action at this time.
0 commit comments