clan-cli: Fix garbled clan vms run output. docs: Improve debugging guide
This commit is contained in:
@@ -73,17 +73,6 @@ def get_clan_nix_attrset(clan_dir: Flake | None = None) -> ClanExports:
|
||||
|
||||
log.debug(f"Evaluating flake {clan_dir} for Clan attrsets")
|
||||
|
||||
# from clan_cli.nix import nix_metadata
|
||||
# from urllib.parse import urlencode
|
||||
# myurl = f"path://{clan_dir}"
|
||||
|
||||
# metadata = nix_metadata(myurl)["locked"]
|
||||
# query_params = {
|
||||
# "lastModified": metadata["lastModified"],
|
||||
# "narHash": metadata["narHash"]
|
||||
# }
|
||||
# url = f"{myurl}?{urlencode(query_params)}"
|
||||
|
||||
# Nix evaluation script to compute find inputs that have a "clan" attribute
|
||||
eval_script = f"""
|
||||
let
|
||||
|
||||
@@ -129,6 +129,7 @@ def start_vm(
|
||||
env.update(extra_env)
|
||||
cmd = nix_shell(packages, args)
|
||||
machine.debug(f"Starting VM with command: {cmd}")
|
||||
|
||||
with subprocess.Popen(
|
||||
cmd, env=env, stdout=stdout, stderr=stderr, stdin=stdin
|
||||
) as process:
|
||||
@@ -354,7 +355,7 @@ def run_vm(
|
||||
stdout=sys.stdout.buffer,
|
||||
stderr=sys.stderr.buffer,
|
||||
input_bytes=None,
|
||||
log=Log.BOTH,
|
||||
log=Log.NONE,
|
||||
)
|
||||
args: list[str] = vm.process.args # type: ignore[assignment]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user