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:
parent
98e87d1bd3
commit
f41ffa9094
1 changed files with 6 additions and 2 deletions
|
|
@ -136,7 +136,7 @@ impl PhpVersion {
|
||||||
return Err(e);
|
return Err(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
docker
|
if let Err(e) = docker
|
||||||
.connect_network(
|
.connect_network(
|
||||||
"haze",
|
"haze",
|
||||||
ConnectNetworkOptions {
|
ConnectNetworkOptions {
|
||||||
|
|
@ -148,7 +148,11 @@ impl PhpVersion {
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.into_diagnostic()?;
|
.into_diagnostic()
|
||||||
|
{
|
||||||
|
docker.remove_container(&id, None).await.ok();
|
||||||
|
return Err(e);
|
||||||
|
}
|
||||||
|
|
||||||
Ok(id)
|
Ok(id)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue