mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
rustbuild: Fix building from an empty directory
A stray shutil.rmtree happened when it shouldn't have happened, causing the entire build to fail.
This commit is contained in:
parent
f25f0e8de9
commit
613f449edd
@ -73,7 +73,8 @@ class RustBuild:
|
|||||||
|
|
||||||
if self.rustc().startswith(self.bin_root()) and \
|
if self.rustc().startswith(self.bin_root()) and \
|
||||||
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
|
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
|
||||||
shutil.rmtree(self.bin_root())
|
if os.path.exists(self.bin_root()):
|
||||||
|
shutil.rmtree(self.bin_root())
|
||||||
filename = "rust-std-nightly-" + self.build + ".tar.gz"
|
filename = "rust-std-nightly-" + self.build + ".tar.gz"
|
||||||
url = "https://static.rust-lang.org/dist/" + self.snap_rustc_date()
|
url = "https://static.rust-lang.org/dist/" + self.snap_rustc_date()
|
||||||
tarball = os.path.join(rustc_cache, filename)
|
tarball = os.path.join(rustc_cache, filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user