From 2226e97ec2150ab2b4ae180a1a1858b999aae261 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 10 Jun 2020 15:22:12 +0200 Subject: Combine lock file update messages --- src/libexpr/flake/flake.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/libexpr/flake/flake.cc') diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index 73f94dae9..f3004557c 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -498,9 +498,6 @@ LockedFlake lockFlake( auto diff = diffLockFiles(oldLockFile, newLockFile); - if (!(oldLockFile == LockFile())) - printInfo("inputs of flake '%s' changed:\n%s", topRef, chomp(diff)); - if (lockFlags.writeLockFile) { if (auto sourcePath = topRef.input.getSourcePath()) { if (!newLockFile.isImmutable()) { @@ -517,7 +514,7 @@ LockedFlake lockFlake( bool lockFileExists = pathExists(path); if (lockFileExists) - warn("updating lock file '%s'", path); + warn("updating lock file '%s':\n%s", path, chomp(diff)); else warn("creating lock file '%s'", path); @@ -553,7 +550,7 @@ LockedFlake lockFlake( } else throw Error("cannot write modified lock file of flake '%s' (use '--no-write-lock-file' to ignore)", topRef); } else - warn("not writing modified lock file of flake '%s'", topRef); + warn("not writing modified lock file of flake '%s':\n%s", topRef, chomp(diff)); } return LockedFlake { .flake = std::move(flake), .lockFile = std::move(newLockFile) }; -- cgit v1.2.3