diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-03-01 12:02:11 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-03-01 12:02:11 -0800 |
| commit | 613f449eddf1f899287b55c16f50f32e78e70aca (patch) | |
| tree | 9d137e57d04d3f211ee5ebc04d37a83ff03ecad0 | |
| parent | f25f0e8de91436fbf2630150d17569525e09bab6 (diff) | |
| download | rust-613f449eddf1f899287b55c16f50f32e78e70aca.tar.gz rust-613f449eddf1f899287b55c16f50f32e78e70aca.zip | |
rustbuild: Fix building from an empty directory
A stray shutil.rmtree happened when it shouldn't have happened, causing the entire build to fail.
| -rw-r--r-- | src/bootstrap/bootstrap.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 6659894a171..5de7e6957c6 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -73,7 +73,8 @@ class RustBuild: if self.rustc().startswith(self.bin_root()) and \ (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" url = "https://static.rust-lang.org/dist/" + self.snap_rustc_date() tarball = os.path.join(rustc_cache, filename) |
