mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 22:46:16 +02:00
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
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ void NixRepl::mainLoop(const Strings & files)
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!processLine(input)) return;
|
if (!removeWhitespace(input).empty() && !processLine(input)) return;
|
||||||
} catch (ParseError & e) {
|
} catch (ParseError & e) {
|
||||||
if (e.msg().find("unexpected $end") != std::string::npos) {
|
if (e.msg().find("unexpected $end") != std::string::npos) {
|
||||||
// For parse errors on incomplete input, we continue waiting for the next line of
|
// For parse errors on incomplete input, we continue waiting for the next line of
|
||||||
|
|
Loading…
Reference in a new issue