aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-11-02 19:07:37 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-11-02 19:07:37 +0100
commit550e11f077ae508abde5a33998a9d4029880e7b2 (patch)
tree90d7731742e0b67e168fa33fc07466acccc10f2c
parent7cf874c17d466d5cffdb0eb6215fcfe8930ed757 (diff)
nix repl: Fix handling of multi-line expressions
-rw-r--r--src/nix/repl.cc6
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