sdk: Don't wait for cleanup
Some checks failed
lint/clippy Checking for common mistakes and opportunities for code improvement
build/linux Build for the target platform: linux
build/msvc Build for the target platform: msvc

This commit is contained in:
Lucas Schwiderski 2023-10-30 09:21:47 +01:00
parent 93db78d58f
commit 57224622d9
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8

View file

@ -96,12 +96,15 @@ where
let content = output.stdout;
// No need to wait for this, so we move it to a separate task.
tokio::spawn(async move {
if let Err(err) = fs::remove_file(&temp)
.await
.wrap_err("Failed to remove temporary file")
.wrap_err_with(|| format!("Failed to remove temporary file '{}'", temp.display()))
{
tracing::warn!("{:?}", err);
}
});
Ok(vec![UserFile::with_name(content, name)])
}