aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2019-09-30 14:06:52 +0200
committerGitHub <noreply@github.com>2019-09-30 14:06:52 +0200
commit2d2769f68c7920854ef34ad723c910b6ea2e973d (patch)
tree6338968bac19c3182a01bc6d6d638606b97fb7b3 /src/libstore
parent043365c2fb3f30dd01db2e2b26ac2760a2e8d370 (diff)
parent58a85fa4621faaa89286065f5583328783085722 (diff)
Merge pull request #2338 from bobvanderlinden/pr-cannot-delete-alive-why
mention `nix-store --query --roots` when a path cannot be deleted
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/gc.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index a166f4ee2..7d3da1cc8 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -783,7 +783,11 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
assertStorePath(i);
tryToDelete(state, i);
if (state.dead.find(i) == state.dead.end())
- throw Error(format("cannot delete path '%1%' since it is still alive") % i);
+ throw Error(format(
+ "cannot delete path '%1%' since it is still alive. "
+ "To find out why use: "
+ "nix-store --query --roots"
+ ) % i);
}
} else if (options.maxFreed > 0) {