nix repl: Fix handling of multi-line expressions

This commit is contained in:
Eelco Dolstra 2020-11-02 19:07:37 +01:00
parent 7cf874c17d
commit 550e11f077

View file

@ -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;