Always download archives, since we delete them after use anyhow. This prevents using archives left behind by mistake in the past. (#324)

Fixes #323
This commit is contained in:
Alon Zakai
2019-08-21 13:42:09 -07:00
committed by GitHub
parent 6a4c0f981d
commit da4900b83f

6
emsdk
View File

@@ -1584,7 +1584,13 @@ class Tool(object):
elif hasattr(self, 'git_branch'):
success = git_clone_checkout_and_pull(url, self.installation_path(), self.git_branch)
elif url.endswith(ARCHIVE_SUFFIXES):
# TODO: explain the vs-tool special-casing
download_even_if_exists = (self.id == 'vs-tool')
# if we are downloading a zip, we will unpack and delete it after immediately anyhow,
# so there is no need to look for an existing one (which may have been left behind
# due to an error in the past)
if url.endswith(ARCHIVE_SUFFIXES):
download_even_if_exists = True
filename_prefix = getattr(self, 'zipfile_prefix', '')
success = download_and_unzip(url, self.installation_path(), download_even_if_exists=download_even_if_exists, filename_prefix=filename_prefix)
else: