1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

cleanup php container if network attach fails

This commit is contained in:
Robin Appelman 2022-08-25 15:18:56 +02:00
commit f41ffa9094

View file

@ -136,7 +136,7 @@ impl PhpVersion {
return Err(e);
}
docker
if let Err(e) = docker
.connect_network(
"haze",
ConnectNetworkOptions {
@ -148,7 +148,11 @@ impl PhpVersion {
},
)
.await
.into_diagnostic()?;
.into_diagnostic()
{
docker.remove_container(&id, None).await.ok();
return Err(e);
}
Ok(id)
}