about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/tarball.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/tarball.rs b/src/bootstrap/tarball.rs
index 5d73a655427..32c8e791bfc 100644
--- a/src/bootstrap/tarball.rs
+++ b/src/bootstrap/tarball.rs
@@ -241,10 +241,16 @@ impl<'a> Tarball<'a> {
     }
 
     pub(crate) fn bare(self) -> PathBuf {
+        // Bare tarballs should have the top level directory match the package
+        // name, not "image". We rename the image directory just before passing
+        // into rust-installer.
+        let dest = self.temp_dir.join(self.package_name());
+        t!(std::fs::rename(&self.image_dir, &dest));
+
         self.run(|this, cmd| {
             cmd.arg("tarball")
                 .arg("--input")
-                .arg(&this.image_dir)
+                .arg(&dest)
                 .arg("--output")
                 .arg(crate::dist::distdir(this.builder).join(this.package_name()));
         })