summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpsakievich <psakiev@sandia.gov>2024-04-03 13:02:48 -0600
committerGitHub <noreply@github.com>2024-04-03 12:02:48 -0700
commitdfe537f688da09e06fd313ddc056c0832bc8b3ea (patch)
treedee4d750f2b424e09a88355b9fd9da9f005ff20d /lib
parentbe0002b460d4e51d24a834c2152ada9d4acc4baa (diff)
downloadspack-dfe537f688da09e06fd313ddc056c0832bc8b3ea.tar.gz
spack-dfe537f688da09e06fd313ddc056c0832bc8b3ea.tar.bz2
spack-dfe537f688da09e06fd313ddc056c0832bc8b3ea.tar.xz
spack-dfe537f688da09e06fd313ddc056c0832bc8b3ea.zip
Convert curl env mod method to a side effect (#43474)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/util/web.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py
index aba1163811..24f4f53618 100644
--- a/lib/spack/spack/util/web.py
+++ b/lib/spack/spack/util/web.py
@@ -116,8 +116,8 @@ def append_curl_env_for_ssl_certs(curl):
"CURL config:ssl_certs "
"resolves to {}. This is not a file so default certs will be used.".format(certs)
)
- tty.debug(dbg_msg_no_ssl_cert_config)
- return curl
+ else:
+ tty.debug(dbg_msg_no_ssl_cert_config)
def _urlopen():
@@ -348,7 +348,8 @@ def _curl(curl=None):
except CommandNotFoundError as exc:
tty.error(str(exc))
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="."):