add "error_for_status" to static file downloads

This commit is contained in:
Aiden McClelland
2022-06-14 11:01:45 -06:00
committed by Aiden McClelland
parent dbf59a7853
commit 90e09c8c25

View File

@@ -193,7 +193,8 @@ pub async fn install(
Current::new().compat(),
platforms::TARGET_ARCH,
))
.await?,
.await?
.error_for_status()?,
),
&mut File::create(public_dir_path.join("LICENSE.md")).await?,
)
@@ -211,7 +212,8 @@ pub async fn install(
Current::new().compat(),
platforms::TARGET_ARCH,
))
.await?,
.await?
.error_for_status()?,
),
&mut File::create(public_dir_path.join("INSTRUCTIONS.md")).await?,
)
@@ -229,7 +231,8 @@ pub async fn install(
Current::new().compat(),
platforms::TARGET_ARCH,
))
.await?,
.await?
.error_for_status()?,
),
&mut File::create(public_dir_path.join(format!("icon.{}", icon_type))).await?,
)