diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-06T11·20+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-06T11·20+0200 |
commit | ad0dd359b4434db84bf6458715440cc15f896ddc (patch) | |
tree | b951f87b5b26a1e38d2eff57db0e7054c30b4d13 /nix-repl.cc | |
parent | 0b419c048b206e2fe68758ea1bd5fa7b1c29c521 (diff) |
Don't exit on SIGINT during evaluation
However, this may leave thunks in black-holed state, so it's not really safe.
Diffstat (limited to 'nix-repl.cc')
-rw-r--r-- | nix-repl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nix-repl.cc b/nix-repl.cc index bb18359c155e..45d7433396ec 100644 --- a/nix-repl.cc +++ b/nix-repl.cc @@ -123,6 +123,8 @@ void NixRepl::mainLoop() processLine(removeWhitespace(line)); } catch (Error & e) { printMsg(lvlError, e.msg()); + } catch (Interrupted & e) { + printMsg(lvlError, e.msg()); } std::cout << std::endl; @@ -176,6 +178,7 @@ void NixRepl::addAttrsToScope(Value & attrs) state.forceAttrs(attrs); foreach (Bindings::iterator, i, *attrs.attrs) addVarToScope(i->name, i->value); + printMsg(lvlError, format("added %1% variables") % attrs.attrs->size()); } |