mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Fixed truncated output of internal console runs
This commit is contained in:
parent
47c0f89e0a
commit
6ccd1d00de
1 changed files with 21 additions and 13 deletions
|
|
@ -147,22 +147,28 @@ int Console::Flush()
|
|||
Slot& slot = processes[i];
|
||||
if(!slot.process)
|
||||
continue;
|
||||
String s;
|
||||
slot.process->Read(s);
|
||||
if(!IsNull(s)) {
|
||||
done_output = true;
|
||||
if(slot.outfile)
|
||||
slot.outfile->Put(s);
|
||||
if(!slot.quiet) {
|
||||
if(console_lock < 0 || console_lock == i) {
|
||||
console_lock = i;
|
||||
AppendOutput(s);
|
||||
auto Read = [&] {
|
||||
String s;
|
||||
slot.process->Read(s);
|
||||
if(!IsNull(s)) {
|
||||
done_output = true;
|
||||
if(slot.outfile)
|
||||
slot.outfile->Put(s);
|
||||
if(!slot.quiet) {
|
||||
if(console_lock < 0 || console_lock == i) {
|
||||
console_lock = i;
|
||||
AppendOutput(s);
|
||||
}
|
||||
else
|
||||
slot.output.Cat(s);
|
||||
}
|
||||
else
|
||||
slot.output.Cat(s);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Read();
|
||||
if(!slot.process->IsRunning()) {
|
||||
while(Read());
|
||||
Kill(i);
|
||||
if(slot.exitcode != 0 && verbosebuild)
|
||||
spooled_output.Cat("Error executing " + slot.cmdline + "\n");
|
||||
|
|
@ -179,10 +185,12 @@ int Console::Flush()
|
|||
|
||||
int Console::Execute(One<AProcess> pick_ p, const char *command, Stream *out, bool q)
|
||||
{
|
||||
DLOG("Execute " << command);
|
||||
Wait();
|
||||
if(!Run(pick(p), command, out, q, 0))
|
||||
return -1;
|
||||
Wait();
|
||||
Flush();
|
||||
return processes[0].exitcode;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue