GH-4125 fix it better

This commit is contained in:
Petr Mrázek 2022-01-08 12:26:16 +01:00 committed by swirl
parent dc129fd886
commit f78bb90ed9

View File

@ -61,10 +61,6 @@ void JavaChecker::stdoutReady()
QByteArray data = process->readAllStandardOutput(); QByteArray data = process->readAllStandardOutput();
QString added = QString::fromLocal8Bit(data); QString added = QString::fromLocal8Bit(data);
added.remove('\r'); added.remove('\r');
// NOTE: workaround for GH-4125, where garbage is getting printed into stdout on bedrock linux
if (added.contains("/bedrock/strata")) {
return;
}
m_stdout += added; m_stdout += added;
} }
@ -107,6 +103,10 @@ void JavaChecker::finished(int exitcode, QProcess::ExitStatus status)
for(QString line : lines) for(QString line : lines)
{ {
line = line.trimmed(); line = line.trimmed();
// NOTE: workaround for GH-4125, where garbage is getting printed into stdout on bedrock linux
if (line.contains("/bedrock/strata")) {
continue;
}
auto parts = line.split('=', QString::SkipEmptyParts); auto parts = line.split('=', QString::SkipEmptyParts);
if(parts.size() != 2 || parts[0].isEmpty() || parts[1].isEmpty()) if(parts.size() != 2 || parts[0].isEmpty() || parts[1].isEmpty())