Don't exit on SIGINT during evaluation
However, this may leave thunks in black-holed state, so it's not really safe.
This commit is contained in:
parent
0b419c048b
commit
ad0dd359b4
1 changed files with 3 additions and 0 deletions
|
@ -123,6 +123,8 @@ void NixRepl::mainLoop()
|
||||||
processLine(removeWhitespace(line));
|
processLine(removeWhitespace(line));
|
||||||
} catch (Error & e) {
|
} catch (Error & e) {
|
||||||
printMsg(lvlError, e.msg());
|
printMsg(lvlError, e.msg());
|
||||||
|
} catch (Interrupted & e) {
|
||||||
|
printMsg(lvlError, e.msg());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
@ -176,6 +178,7 @@ void NixRepl::addAttrsToScope(Value & attrs)
|
||||||
state.forceAttrs(attrs);
|
state.forceAttrs(attrs);
|
||||||
foreach (Bindings::iterator, i, *attrs.attrs)
|
foreach (Bindings::iterator, i, *attrs.attrs)
|
||||||
addVarToScope(i->name, i->value);
|
addVarToScope(i->name, i->value);
|
||||||
|
printMsg(lvlError, format("added %1% variables") % attrs.attrs->size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue