From 6843faebc650120d41341f23e56e70b7f63cd5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=B3=E5=85=89=E5=B0=91=E5=B9=B4?= <849317537@qq.com> Date: Thu, 8 Aug 2024 03:20:55 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=81=9C=E6=AD=A2=E6=89=80?= =?UTF-8?q?=E6=9C=89=E6=88=96=E8=80=85=E5=88=A0=E9=99=A4=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index 5984274..2f1d091 100644 --- a/src/main.rs +++ b/src/main.rs @@ -531,6 +531,12 @@ fn show_containers(is_show_all: bool) -> Result<()> { } fn stop_container(containers_id: &str, is_remove: bool) -> Result<()> { + if containers_id == "all" { + for container_info in get_all_container_info()?{ + stop_container(container_info.id.as_str(), is_remove)? + } + return Ok(()) + } for container_id in containers_id.split(" ") { if let Ok(container_info) = get_container_info(container_id) { let container_work_path = Path::new(WORKSPACE).join("containers").join(container_id);