From 4f54c0fbe7886c8551368b4b35be3ad8c7ae49ab Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Wed, 9 Apr 2025 11:40:33 -0600 Subject: [PATCH] fix: remove the "mc stop" meant to be in the container, but not implemented --- docs/specs/1_SPECIFICATIONS.md | 2 -- mcontainer/cli.py | 15 --------------- 2 files changed, 17 deletions(-) diff --git a/docs/specs/1_SPECIFICATIONS.md b/docs/specs/1_SPECIFICATIONS.md index f750dd7..09a7155 100644 --- a/docs/specs/1_SPECIFICATIONS.md +++ b/docs/specs/1_SPECIFICATIONS.md @@ -195,8 +195,6 @@ mc session close # Connect to an existing session mc session connect -# Stop the current session (from inside the container) -mc stop ``` ### Remote Management diff --git a/mcontainer/cli.py b/mcontainer/cli.py index 8a230b1..4e706a2 100644 --- a/mcontainer/cli.py +++ b/mcontainer/cli.py @@ -411,21 +411,6 @@ def session_logs( console.print(logs) -@app.command() -def stop() -> None: - """Stop the current MC session (from inside the container)""" - # Check if running inside a container - if not os.path.exists("/.dockerenv"): - console.print( - "[red]This command can only be run from inside a MC container[/red]" - ) - return - - # Stop the container from inside - console.print("Stopping the current session...") - os.system("kill 1") # Send SIGTERM to PID 1 (container's init process) - - @driver_app.command("list") def list_drivers() -> None: """List available MC drivers"""