Ignore blank inputs.
Previously, nix-repl would consider this an incomplete parse and wait for the next line as if it was a multiline input. Blank lines in the middle of a multiline input will continue to work.
This commit is contained in:
parent
87e6649fc3
commit
38816759fc
|
@ -106,7 +106,7 @@ void NixRepl::mainLoop(const Strings & files)
|
|||
}
|
||||
|
||||
try {
|
||||
if (!processLine(input)) return;
|
||||
if (!removeWhitespace(input).empty() && !processLine(input)) return;
|
||||
} catch (ParseError & e) {
|
||||
if (e.msg().find("unexpected $end") != std::string::npos) {
|
||||
// For parse errors on incomplete input, we continue waiting for the next line of
|
||||
|
|
Loading…
Reference in a new issue