Auto merge of #96207 - nikic:distcheck-dir, r=Mark-Simulacrum

Ensure existance of dist directory when creating tarball

I'm not sure why this works in CI, but this is necessary to make distcheck (including the `x86_64-linux-distcheck` image) run on Fedora 35.
This commit is contained in:
bors 2022-04-22 08:01:28 +00:00
commit 8d68f2f94f

View File

@ -262,11 +262,13 @@ pub(crate) fn bare(self) -> GeneratedTarball {
t!(std::fs::rename(&self.image_dir, &dest));
self.run(|this, cmd| {
let distdir = crate::dist::distdir(this.builder);
t!(std::fs::create_dir_all(&distdir));
cmd.arg("tarball")
.arg("--input")
.arg(&dest)
.arg("--output")
.arg(crate::dist::distdir(this.builder).join(this.package_name()));
.arg(distdir.join(this.package_name()));
})
}