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
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:
parent
93db78d58f
commit
57224622d9
1 changed files with 9 additions and 6 deletions
|
@ -96,12 +96,15 @@ where
|
||||||
|
|
||||||
let content = output.stdout;
|
let content = output.stdout;
|
||||||
|
|
||||||
if let Err(err) = fs::remove_file(&temp)
|
// No need to wait for this, so we move it to a separate task.
|
||||||
.await
|
tokio::spawn(async move {
|
||||||
.wrap_err("Failed to remove temporary file")
|
if let Err(err) = fs::remove_file(&temp)
|
||||||
{
|
.await
|
||||||
tracing::warn!("{:?}", err);
|
.wrap_err_with(|| format!("Failed to remove temporary file '{}'", temp.display()))
|
||||||
}
|
{
|
||||||
|
tracing::warn!("{:?}", err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Ok(vec![UserFile::with_name(content, name)])
|
Ok(vec![UserFile::with_name(content, name)])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue