mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-31 08:25:36 +00:00
Exited containers do not have empty status
This commit is contained in:
parent
df536f672f
commit
85626a4157
@ -66,7 +66,7 @@ do ->
|
|||||||
.filter (containerInfo) ->
|
.filter (containerInfo) ->
|
||||||
isUserApp = _.contains(apps, containerInfo.Image)
|
isUserApp = _.contains(apps, containerInfo.Image)
|
||||||
isSupervisor = _.contains(supervisorImages, containerInfo.Image)
|
isSupervisor = _.contains(supervisorImages, containerInfo.Image)
|
||||||
isRunning = !!containerInfo.Status
|
isRunning = not containerInfo.Status.match(/^Exited/)
|
||||||
not (isUserApp or (isSupervisor and isRunning))
|
not (isUserApp or (isSupervisor and isRunning))
|
||||||
.map (containerInfo) ->
|
.map (containerInfo) ->
|
||||||
docker.getContainer(containerInfo.Id).removeAsync()
|
docker.getContainer(containerInfo.Id).removeAsync()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user