mirror of https://gitee.com/bigwinds/arangodb
fix return code for interactive mode
This commit is contained in:
parent
d6a063e28d
commit
347b840d5e
|
@ -331,7 +331,8 @@ int V8ShellFeature::runShell(std::vector<std::string> const& positionals) {
|
|||
client = nullptr;
|
||||
}
|
||||
|
||||
bool lastEmpty = false;
|
||||
bool const isBatch = isatty(STDIN_FILENO) == 0;
|
||||
bool lastEmpty = isBatch;
|
||||
|
||||
while (true) {
|
||||
_console->setPromptError(promptError);
|
||||
|
@ -350,7 +351,7 @@ int V8ShellFeature::runShell(std::vector<std::string> const& positionals) {
|
|||
lastEmpty = true;
|
||||
continue;
|
||||
}
|
||||
lastEmpty = false;
|
||||
lastEmpty = isBatch;
|
||||
|
||||
_console->log(prompt._plain + input + "\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue