From a5ac69e4f2537772b00c92334dec8959e304e74e Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 5 Apr 2024 08:38:27 +0300 Subject: [PATCH] Copy files a bit earlier --- make-it-static/src/main.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/make-it-static/src/main.rs b/make-it-static/src/main.rs index 19da542..f60afe9 100644 --- a/make-it-static/src/main.rs +++ b/make-it-static/src/main.rs @@ -64,6 +64,13 @@ fn main() -> Result<()> { let client = reqwest::blocking::Client::new(); let running_server = RunningServer::new(&client)?; + + // Wait until after the server has started to ensure we clone the content repo. + let status = Command::new("cp") + .args(["-r", "../content/static", "../public/assets"]) + .status()?; + anyhow::ensure!(status.success(), "Failed copying assets dir"); + let mut app = App { processed: HashSet::new(), queue: VecDeque::new(), @@ -81,12 +88,6 @@ fn main() -> Result<()> { process(&mut app, route)?; } - // Wait until after the server has started to ensure we clone the content repo. - let status = Command::new("cp") - .args(["-r", "../content/static", "../public/assets"]) - .status()?; - anyhow::ensure!(status.success(), "Failed copying assets dir"); - Ok(()) }