Commit ab67ab07 authored by alice's avatar alice 😈
Browse files

setup-proxy: fix empty proxy

the while loop loops until the value of proxyurl is none or a http*://
scheme. however, when proxyurl is set to 'none', it then gets unset here
(`proxyurl= ;`), but the following `if` block checks if it is 'none' and
fails, so we configure an empty http_proxy= in the profile
script. this is then read by some software, and it causes it to crash.
for instance, flatpak via glib reads `http_proxy` from the environment,
and an empty variable is illegal.
parent 2b6126d6
Pipeline #126427 passed with stage
in 23 seconds
......@@ -41,7 +41,7 @@ suggest=${http_proxy:-none}
while [ $# -eq 0 ]; do
case "$proxyurl" in
http://*|https://*) break;;
none) proxyurl= ; break;;
none) break;;
ask "HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none')" $suggest
......@@ -4,7 +4,8 @@
init_tests \
setup_proxy_usage \
setup_proxy_url \
setup_proxy_none \
setup_proxy_usage_body() {
test_usage setup-proxy
......@@ -35,3 +36,18 @@ setup_proxy_none_body() {
setup_proxy_interactive_none_body() {
mkdir -p etc/profile.d
touch etc/profile.d/
echo none | atf_check -s exit:0 \
-o match:"HTTP/FTP proxy URL" \
-e empty \
if test -e etc/profile.d/; then
atf_fail "etc/profile.d/ was not removed"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment