diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-11-02 19:07:37 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-11-02 19:07:37 +0100 |
commit | 550e11f077ae508abde5a33998a9d4029880e7b2 (patch) | |
tree | 90d7731742e0b67e168fa33fc07466acccc10f2c | |
parent | 7cf874c17d466d5cffdb0eb6215fcfe8930ed757 (diff) |
nix repl: Fix handling of multi-line expressions
-rw-r--r-- | src/nix/repl.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 9ff386b1d..71794a309 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -212,7 +212,7 @@ void NixRepl::mainLoop(const std::vector<std::string> & files) try { if (!removeWhitespace(input).empty() && !processLine(input)) return; } catch (ParseError & e) { - if (e.msg().find("unexpected $end") != std::string::npos) { + if (e.msg().find("unexpected end of file") != std::string::npos) { // For parse errors on incomplete input, we continue waiting for the next line of // input without clearing the input so far. continue; @@ -220,9 +220,9 @@ void NixRepl::mainLoop(const std::vector<std::string> & files) printMsg(lvlError, e.msg()); } } catch (Error & e) { - printMsg(lvlError, e.msg()); + printMsg(lvlError, e.msg()); } catch (Interrupted & e) { - printMsg(lvlError, e.msg()); + printMsg(lvlError, e.msg()); } // We handled the current input fully, so we should clear it |