From b914678a359f9b3aa0a672b711b78331d93cf22a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 19 Apr 2022 10:49:37 +0200 Subject: [PATCH] Ensure existance of dist directory when creating tarball --- src/bootstrap/tarball.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/tarball.rs b/src/bootstrap/tarball.rs index c743c5188e7..689b4819cdd 100644 --- a/src/bootstrap/tarball.rs +++ b/src/bootstrap/tarball.rs @@ -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())); }) }