aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/repl.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-04-06 15:25:06 +0200
committerEelco Dolstra <edolstra@gmail.com>2023-04-06 15:25:06 +0200
commita9759407e55fb02c6e306fdd9fcedd821e465024 (patch)
tree9359ee9478d9d4f4c9bf74bfb4bba745a6a36bbf /src/libcmd/repl.cc
parent94812cca98fbb157e5f64a15a85a2b852d289feb (diff)
Origin: Use SourcePath
Diffstat (limited to 'src/libcmd/repl.cc')
-rw-r--r--src/libcmd/repl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index 9002fa555..c7fd0db91 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -594,8 +594,8 @@ bool NixRepl::processLine(std::string line)
return {path, 0};
} else if (v.isLambda()) {
auto pos = state->positions[v.lambda.fun->pos];
- if (auto path = std::get_if<Path>(&pos.origin))
- return {SourcePath(CanonPath(*path)), pos.line};
+ if (auto path = std::get_if<SourcePath>(&pos.origin))
+ return {*path, pos.line};
else
throw Error("'%s' cannot be shown in an editor", pos);
} else {