aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-path.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-02-07 14:22:01 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-03-24 14:06:47 +0100
commit231a8aa2c2196a3ba6d6bd3dc9d6c50e23e20a8d (patch)
tree9fb2341478d781e3f3f3b8a88c22cf619622466a /src/libexpr/attr-path.cc
parentc1ca4f0accdb96295b27dadacd20b3db745e1d2d (diff)
nix edit: Support non-derivation attributes
E.g. $ nix edit .#nixosConfigurations.bla now works. (cherry picked from commit d2032edb2f86e955a8a7724a27c0c3225f386500)
Diffstat (limited to 'src/libexpr/attr-path.cc')
-rw-r--r--src/libexpr/attr-path.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc
index 1e22f5708..4545bfd72 100644
--- a/src/libexpr/attr-path.cc
+++ b/src/libexpr/attr-path.cc
@@ -103,7 +103,7 @@ Pos findDerivationFilename(EvalState & state, Value & v, std::string what)
auto dummyArgs = state.allocBindings(0);
v2 = findAlongAttrPath(state, "meta.position", *dummyArgs, v).first;
} catch (Error &) {
- throw Error("package '%s' has no source location information", what);
+ throw NoPositionInfo("package '%s' has no source location information", what);
}
// FIXME: is it possible to extract the Pos object instead of doing this