mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Add tests for read-only local store
Make sure we don't go down the path of making temproots when doing operations on a read-only store
This commit is contained in:
parent
5966b76c97
commit
85a2453052
3 changed files with 35 additions and 1 deletions
|
@ -110,6 +110,10 @@ void LocalStore::createTempRootsFile()
|
|||
|
||||
void LocalStore::addTempRoot(const StorePath & path)
|
||||
{
|
||||
if (readOnly) {
|
||||
debug("Read-only store doesn't support creating lock files for temp roots, but nothing can be deleted anyways.");
|
||||
return;
|
||||
}
|
||||
createTempRootsFile();
|
||||
|
||||
/* Open/create the global GC lock file. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue