Skip to content

Commit aef92d4

Browse files
committed
Auto merge of rust-lang#80397 - Mark-Simulacrum:fix-bare-tarball, r=pietroalbini
Use package name for top-level directory in bare tarballs This fixes a bug introduced by rust-lang#79788. r? `@pietroalbini`
2 parents 6c523a7 + fe52a65 commit aef92d4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bootstrap/tarball.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,16 @@ impl<'a> Tarball<'a> {
241241
}
242242

243243
pub(crate) fn bare(self) -> PathBuf {
244+
// Bare tarballs should have the top level directory match the package
245+
// name, not "image". We rename the image directory just before passing
246+
// into rust-installer.
247+
let dest = self.temp_dir.join(self.package_name());
248+
t!(std::fs::rename(&self.image_dir, &dest));
249+
244250
self.run(|this, cmd| {
245251
cmd.arg("tarball")
246252
.arg("--input")
247-
.arg(&this.image_dir)
253+
.arg(&dest)
248254
.arg("--output")
249255
.arg(crate::dist::distdir(this.builder).join(this.package_name()));
250256
})

0 commit comments

Comments
 (0)