repl: clear the interrupt before reading the next line
Otherwise, it will be thrown again during exit when the repl is terminated by
end-of-input after the last command was interrupted.
Change-Id: I8456c47bc36cfb0892efdad5420f318f7e6526d5
This commit is contained in:
parent
914b0febf7
commit
eeb7e71810
|
@ -262,6 +262,8 @@ ReplExitStatus NixRepl::mainLoop()
|
|||
std::string input;
|
||||
|
||||
while (true) {
|
||||
_isInterrupted = false;
|
||||
|
||||
// When continuing input from previous lines, don't print a prompt, just align to the same
|
||||
// number of chars as the prompt.
|
||||
if (!interacter->getLine(input, input.empty() ? ReplPromptType::ReplPrompt : ReplPromptType::ContinuationPrompt)) {
|
||||
|
@ -424,8 +426,6 @@ ProcessLineResult NixRepl::processLine(std::string line)
|
|||
if (line.empty())
|
||||
return ProcessLineResult::PromptAgain;
|
||||
|
||||
_isInterrupted = false;
|
||||
|
||||
std::string command, arg;
|
||||
|
||||
if (line[0] == ':') {
|
||||
|
|
Loading…
Reference in a new issue