Skip to content

Commit 401451f

Browse files
committed
refactor: remove tarball if we dont trust it
1 parent a8564a0 commit 401451f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

guests/python/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ fn download_wasi_sdk() -> Result<(), Box<dyn std::error::Error>> {
7575
let hex_digest = format!("{:x}", digest);
7676

7777
if hex_digest != SHA256_WASI_SDK_SYSROOT {
78+
fs::remove_file(&tar_gz_path)?;
7879
return Err(format!(
7980
"SHA256 mismatch for wasi-sysroot.tar.gz: expected {}, got {}",
8081
SHA256_WASI_SDK_SYSROOT, hex_digest

0 commit comments

Comments
 (0)