diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 902a22967..ca49e231c 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -83,6 +83,7 @@ static PathSet realisePath(const Path & path, bool build = true) else { if (build) store->ensurePath(path); + else if (!store->isValidPath(path)) throw Error(format("path `%1%' does not exist and cannot be created") % path); return singleton(path); } }