diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 73083a0f5ab..27fb38b7a6b 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -216,7 +216,7 @@ def fetch(self): if not self.archive_file: raise FailedDownloadError(self.url) - else: + elif self.digest: shutil.copy(self.archive_file, spack.cache_path)