Skip to content

Commit

Permalink
Check if krunkit process is running
Browse files Browse the repository at this point in the history
The podman machine list technique isn't consisent across podman
machine versions.

Signed-off-by: Eric Curtin <[email protected]>
  • Loading branch information
ericcurtin committed Feb 7, 2025
1 parent 9d02f7d commit 0bcfbdb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ramalama/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def container_manager():
if sys.platform != "darwin":
return "podman"

result = subprocess.run(["pgrep", "krunkit"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if result.returncode == 0:
return "podman"

podman_machine_list = ["podman", "machine", "list"]
conman_args = ["podman", "machine", "list", "--format", "{{ .VMType }}"]
try:
Expand Down

0 comments on commit 0bcfbdb

Please sign in to comment.