Wrapped vm.run in cmd.run. Working --wayland

This commit is contained in:
Qubasa
2024-01-19 13:56:17 +01:00
parent 26259341d4
commit 60c4d231f8
2 changed files with 3 additions and 66 deletions

View File

@@ -2,8 +2,6 @@ import argparse
import json
import logging
import os
import shlex
import subprocess
import sys
import tempfile
from dataclasses import dataclass, field
@@ -235,16 +233,12 @@ def run_vm(
"XDG_DATA_DIRS"
] = f"{remote_viewer_mimetypes}:{env.get('XDG_DATA_DIRS', '')}"
print("$ " + shlex.join(qemu_cmd))
res = subprocess.run(
run(
nix_shell(packages, qemu_cmd),
env=env,
check=False,
stdout=log_fd,
stderr=log_fd,
log=Log.BOTH,
error_msg=f"Could not start vm {machine}",
)
if res.returncode != 0:
raise ClanError(f"qemu failed with {res.returncode}")
@dataclass