about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-08 05:34:37 -0800
committerbors <bors@rust-lang.org>2016-03-08 05:34:37 -0800
commit8f0479b2a5fc16814b68efe9e87dddf231b8941d (patch)
tree52888e744715f0e008ed36afa9cbf21053cb1e41 /src
parent81e03236105263c048e113b856399b899e215303 (diff)
parent613f449eddf1f899287b55c16f50f32e78e70aca (diff)
downloadrust-8f0479b2a5fc16814b68efe9e87dddf231b8941d.tar.gz
rust-8f0479b2a5fc16814b68efe9e87dddf231b8941d.zip
Auto merge of #31995 - alexcrichton:fix-make-clena-empty, r=brson
rustbuild: Fix building from an empty directory

A stray shutil.rmtree happened when it shouldn't have happened, causing the
entire build to fail.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/bootstrap.py3
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)