summaryrefslogtreecommitdiffstats
path: root/src/libexpr/flake/flake.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-10 15:22:12 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-10 15:22:12 +0200
commit2226e97ec2150ab2b4ae180a1a1858b999aae261 (patch)
tree4e07ac0553dd27088866c8d8db3976c523bd0e6b /src/libexpr/flake/flake.cc
parentfc6c7af4249bef4df8c729c71412ddbccfed5c77 (diff)
Combine lock file update messages
Diffstat (limited to 'src/libexpr/flake/flake.cc')
-rw-r--r--src/libexpr/flake/flake.cc7
1 files changed, 2 insertions, 5 deletions
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) };