1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 09:19:36 +01:00

If a .drv cannot be parsed, show its path

Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful.
This commit is contained in:
Eelco Dolstra 2014-04-08 19:24:29 +02:00
parent e0a947cde6
commit dfa2f77d2e
7 changed files with 22 additions and 10 deletions

View file

@ -661,7 +661,7 @@ unsigned long long LocalStore::addValidPath(const ValidPathInfo & info, bool che
efficiently query whether a path is an output of some
derivation. */
if (isDerivation(info.path)) {
Derivation drv = parseDerivation(readFile(info.path));
Derivation drv = readDerivation(info.path);
/* Verify that the output paths in the derivation are correct
(i.e., follow the scheme for computing output paths from
@ -1290,7 +1290,7 @@ void LocalStore::registerValidPaths(const ValidPathInfos & infos)
if (isDerivation(i->path)) {
// FIXME: inefficient; we already loaded the
// derivation in addValidPath().
Derivation drv = parseDerivation(readFile(i->path));
Derivation drv = readDerivation(i->path);
checkDerivationOutputs(i->path, drv);
}