diff --git a/crates/rattler_package_streaming/src/reqwest/tokio.rs b/crates/rattler_package_streaming/src/reqwest/tokio.rs index 6371e6afe..ddf310900 100644 --- a/crates/rattler_package_streaming/src/reqwest/tokio.rs +++ b/crates/rattler_package_streaming/src/reqwest/tokio.rs @@ -25,6 +25,10 @@ async fn get_reader( expected_sha256: Option, reporter: Option>, ) -> Result { + if let Some(reporter) = &reporter { + reporter.on_download_start(); + } + if url.scheme() == "file" { let file = tokio::fs::File::open(url.to_file_path().expect("Could not convert to file path")) @@ -41,10 +45,6 @@ async fn get_reader( request = request.header("X-Expected-Sha256", format!("{sha256:x}")); } - if let Some(reporter) = &reporter { - reporter.on_download_start(); - } - let response = request .send() .await