1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 04:30:59 +01:00

Fix nix-collect-garbage -d with the new profile location

Low-hanging fix for https://github.com/NixOS/nix/pull/5226#issuecomment-1454669399

(cherry picked from commit 2272bc6049)
This commit is contained in:
Théophane Hufschmitt 2023-03-07 10:33:21 +01:00 committed by github-actions[bot]
parent 0dd3be153a
commit 6527dc1614
2 changed files with 18 additions and 2 deletions

View file

@ -77,8 +77,7 @@ static int main_nix_collect_garbage(int argc, char * * argv)
return true;
});
auto profilesDir = settings.nixStateDir + "/profiles";
if (removeOld) removeOldGenerations(profilesDir);
if (removeOld) removeOldGenerations(profilesDir());
// Run the actual garbage collector.
if (!dryRun) {