]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #96207 - nikic:distcheck-dir, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Fri, 22 Apr 2022 08:01:28 +0000 (08:01 +0000)
committerbors <bors@rust-lang.org>
Fri, 22 Apr 2022 08:01:28 +0000 (08:01 +0000)
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.

src/bootstrap/tarball.rs

index c743c5188e7545f47d7f858b74005107e731c01e..689b4819cdd36622eebecc552347c25458a77baa 100644 (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()));
         })
     }