nixos-rebuild-ng: fix printing
print user info (diffs) into stderr, add back missing newline
This commit is contained in:
@@ -540,7 +540,7 @@ def list_generations(profile: Profile) -> list[GenerationJson]:
|
||||
|
||||
def diff_closures(current_config: Path, new_config: Path, target_host: Remote | None = None):
|
||||
print(
|
||||
f"<<< {current_config}"
|
||||
f"<<< {current_config}\n"
|
||||
f">>> {new_config}",
|
||||
file=sys.stderr
|
||||
)
|
||||
@@ -554,6 +554,7 @@ def diff_closures(current_config: Path, new_config: Path, target_host: Remote |
|
||||
new_config,
|
||||
],
|
||||
remote=target_host,
|
||||
stdout=sys.stderr
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
import textwrap
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
@@ -568,7 +569,8 @@ def test_diff_closures(mock_run: Mock) -> None:
|
||||
Path("/run/current-system"),
|
||||
Path("/nix/var/nix/profiles/system"),
|
||||
],
|
||||
remote=None
|
||||
remote=None,
|
||||
stdout=sys.stderr
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user