Convert curl env mod method to a side effect (#43474)
This commit is contained in:
parent
be0002b460
commit
dfe537f688
1 changed files with 4 additions and 3 deletions
|
@ -116,8 +116,8 @@ def append_curl_env_for_ssl_certs(curl):
|
||||||
"CURL config:ssl_certs "
|
"CURL config:ssl_certs "
|
||||||
"resolves to {}. This is not a file so default certs will be used.".format(certs)
|
"resolves to {}. This is not a file so default certs will be used.".format(certs)
|
||||||
)
|
)
|
||||||
tty.debug(dbg_msg_no_ssl_cert_config)
|
else:
|
||||||
return curl
|
tty.debug(dbg_msg_no_ssl_cert_config)
|
||||||
|
|
||||||
|
|
||||||
def _urlopen():
|
def _urlopen():
|
||||||
|
@ -348,7 +348,8 @@ def _curl(curl=None):
|
||||||
except CommandNotFoundError as exc:
|
except CommandNotFoundError as exc:
|
||||||
tty.error(str(exc))
|
tty.error(str(exc))
|
||||||
raise spack.error.FetchError("Missing required curl fetch method")
|
raise spack.error.FetchError("Missing required curl fetch method")
|
||||||
return append_curl_env_for_ssl_certs(curl)
|
append_curl_env_for_ssl_certs(curl)
|
||||||
|
return curl
|
||||||
|
|
||||||
|
|
||||||
def fetch_url_text(url, curl=None, dest_dir="."):
|
def fetch_url_text(url, curl=None, dest_dir="."):
|
||||||
|
|
Loading…
Reference in a new issue