gc: fix paths-not-deleted error message

The newline was previously omitted when fewer than summaryThreshold paths were present.

Change-Id: Ieb9292262f9b5a666784a4273de534941bc31998
This commit is contained in:
Linus Heckemann
2025-03-28 09:46:22 +01:00
parent b918f1c307
commit b52db5e7c1
+2 -2
View File
@@ -836,7 +836,7 @@ try {
pathSummary << "\n " << path;
const int summaryThreshold = 10;
if (n >= summaryThreshold) {
pathSummary << "\nand " << kept.size() - summaryThreshold << " others.\n";
pathSummary << "\nand " << kept.size() - summaryThreshold << " others.";
break;
}
}
@@ -844,7 +844,7 @@ try {
"Cannot delete some of the given paths because they are still alive. "
"Paths not deleted:"
"%1%"
"To find out why, use nix-store --query --roots and nix-store --query --referrers."
"\nTo find out why, use nix-store --query --roots and nix-store --query --referrers."
,
pathSummary.str()
);