clan config: print command in more instances
This commit is contained in:
@@ -107,12 +107,12 @@ def options_for_machine(machine_name: str, show_trace: bool = False) -> dict:
|
|||||||
cmd = nix_eval(flags=flags)
|
cmd = nix_eval(flags=flags)
|
||||||
proc = subprocess.run(
|
proc = subprocess.run(
|
||||||
cmd,
|
cmd,
|
||||||
capture_output=True,
|
stdout=subprocess.PIPE,
|
||||||
text=True,
|
text=True,
|
||||||
)
|
)
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
raise Exception(
|
raise ClanError(
|
||||||
f"Failed to read options for machine {machine_name}:\n{shlex.join(cmd)} returned:\n{proc.stderr}"
|
f"Failed to read options for machine {machine_name}:\n{shlex.join(cmd)}\nexit with {proc.returncode}"
|
||||||
)
|
)
|
||||||
return json.loads(proc.stdout)
|
return json.loads(proc.stdout)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user