diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-08T17·24+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-08T17·24+0200 |
commit | dfa2f77d2e1118f32771c2fceefd683435554b9d (patch) | |
tree | 36502a51878f50cf01246fdb40e5a5f71d819d75 /src/libexpr/primops.cc | |
parent | e0a947cde6d11b5182500f024719b04b8997189a (diff) |
If a .drv cannot be parsed, show its path
Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful.
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index b4e75648f8ab..c69d520d3be0 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -67,7 +67,7 @@ static void prim_import(EvalState & state, const Pos & pos, Value * * args, Valu } if (isStorePath(path) && store->isValidPath(path) && isDerivation(path)) { - Derivation drv = parseDerivation(readFile(path)); + Derivation drv = readDerivation(path); Value & w = *state.allocValue(); state.mkAttrs(w, 1 + drv.outputs.size()); mkString(*state.allocAttr(w, state.sDrvPath), path, singleton<PathSet>("=" + path)); |