nixos-rebuild-ng: do not create result symlink in test/dry-activate

This commit is contained in:
Thiago Kenji Okada
2025-07-04 20:20:05 +01:00
parent cc0851f978
commit 283d016460
2 changed files with 3 additions and 1 deletions
@@ -134,7 +134,8 @@ def _build_system(
flake_common_flags: Args,
) -> Path:
dry_run = action == Action.DRY_BUILD
no_link = action in (Action.SWITCH, Action.BOOT)
# actions that we will not add a /result symlink in CWD
no_link = action in (Action.SWITCH, Action.BOOT, Action.TEST, Action.DRY_ACTIVATE)
match (action, args.rollback, build_host, flake):
case (Action.SWITCH | Action.BOOT, True, _, _):
@@ -1020,6 +1020,7 @@ def test_execute_test_flake(mock_run: Mock, tmp_path: Path) -> None:
"build",
"--print-out-paths",
'github:user/repo#nixosConfigurations."hostname".config.system.build.toplevel',
"--no-link",
],
check=True,
stdout=PIPE,