Skip to content

Commit 102797c

Browse files
authored
Add EMSDK_USE_CURL environment variable to force use of curl (#1695)
1 parent c9ef2c9 commit 102797c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

emsdk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,11 +720,11 @@ def download_file(url, dstpath, download_even_if_exists=False,
720720
mkdir_p(os.path.dirname(file_name))
721721

722722
try:
723-
# Use curl on macOS to avoid CERTIFICATE_VERIFY_FAILED issue with
724-
# python's urllib:
723+
# Use curl on macOS or when EMSDK_USE_CURL is set to avoid
724+
# CERTIFICATE_VERIFY_FAILED issue with python's urllib:
725725
# https://stackoverflow.com/questions/40684543/how-to-make-python-use-ca-certificates-from-mac-os-truststore
726726
# Unlike on linux or windows, curl is always available on macOS systems.
727-
if MACOS:
727+
if MACOS or 'EMSDK_USE_CURL' in os.environ:
728728
download_with_curl(url, file_name)
729729
else:
730730
download_with_urllib(url, file_name)

0 commit comments

Comments
 (0)