mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: docker ps parse if id/name is too long
This commit is contained in:
@@ -143,7 +143,6 @@ final class DockerPs implements ContainerPs {
|
||||
@override
|
||||
bool get running {
|
||||
if (state?.contains('Exited') == true) return false;
|
||||
if (state?.contains('Up') == true) return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -162,9 +161,9 @@ final class DockerPs implements ContainerPs {
|
||||
final parts = raw.split(Miscs.multiBlankreg);
|
||||
return DockerPs(
|
||||
id: parts[0],
|
||||
names: parts[1],
|
||||
image: parts[2],
|
||||
state: parts[3].trim(),
|
||||
state: parts[1],
|
||||
names: parts[2],
|
||||
image: parts[3].trim(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user