From b3c671bed4e785c732fdd881cf1cc39d852eb3bb Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 04:49:28 +0000 Subject: populate: name the target's user in messages unless it's root Messages naming the target, i.e. pruning's lines and the errors about the sentinel, name the user as well, as user@host:path, unless the user is root, the usual one, so deploying as another user, e.g. with sudo, shows. --- tests/scenarios.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/scenarios.nix b/tests/scenarios.nix index fea0a5a..90fe3cb 100644 --- a/tests/scenarios.nix +++ b/tests/scenarios.nix @@ -1050,9 +1050,11 @@ assert !(krops.isLocalTarget (targets.remote "/")); sources = { inherit (sources) a; b.symlink = "a"; }; prune = true; output = map - (name: "pruning ${ - optionalString (targetKind != "local") "${remoteHost}:" - }/var/krops/prune-${targetKind}/${name}") + (name: "pruning '${{ + local = ""; + remote = "${remoteHost}:"; + sudo = "deploy@${remoteHost}:"; + }.${targetKind}}/var/krops/prune-${targetKind}/${name}'...") [ "c" "d" "other" ]; check = '' test -e "$T"/a/flake.nix || fail "a removed" -- cgit v1.3.1