Fix cmd to default print on all outputs. Default print on stderr
This commit is contained in:
@@ -55,7 +55,7 @@ def handle_output(process: subprocess.Popen, log: Log) -> tuple[str, str]:
|
||||
return stdout_buf.decode("utf-8"), stderr_buf.decode("utf-8")
|
||||
|
||||
|
||||
def run(cmd: list[str], cwd: Path = Path.cwd(), log: Log = Log.BOTH) -> CmdOut:
|
||||
def run(cmd: list[str], cwd: Path = Path.cwd(), log: Log = Log.STDERR) -> CmdOut:
|
||||
# Start the subprocess
|
||||
process = subprocess.Popen(
|
||||
cmd, cwd=str(cwd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
|
||||
|
||||
@@ -14,6 +14,7 @@ def test_machine_subcommands(
|
||||
|
||||
capsys.readouterr()
|
||||
cli.run(["--flake", str(test_flake_with_core.path), "machines", "list"])
|
||||
|
||||
out = capsys.readouterr()
|
||||
assert "machine1\nvm1\nvm2\n" == out.out
|
||||
|
||||
|
||||
Reference in New Issue
Block a user