mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
libcmd/repl.cc: Explain evalString call and defend
This commit is contained in:
parent
21817473e8
commit
ac89df815d
1 changed files with 6 additions and 1 deletions
|
@ -632,8 +632,13 @@ ProcessLineResult NixRepl::processLine(std::string line)
|
|||
assert(attrs);
|
||||
auto attr = attrs->get(name);
|
||||
if (!attr) {
|
||||
// Trigger the normal error
|
||||
// When missing, trigger the normal exception
|
||||
// e.g. :doc builtins.foo
|
||||
// behaves like
|
||||
// nix-repl> builtins.foo
|
||||
// error: attribute 'foo' missing
|
||||
evalString(arg, v);
|
||||
assert(false);
|
||||
}
|
||||
if (attr->pos) {
|
||||
fallbackPos = attr->pos;
|
||||
|
|
Loading…
Reference in a new issue