diff --git a/src/BuildTool.bf b/src/BuildTool.bf index ec7de28..7e6ebc5 100644 --- a/src/BuildTool.bf +++ b/src/BuildTool.bf @@ -97,28 +97,22 @@ static class CxxBuildTool FileStream error = scope .(); proc.AttachStandardOutput(output); proc.AttachStandardError(error); + StreamReader outputSr = scope .(output); + StreamReader errorSr = scope .(error); String str = scope .(); - Span buffer = uint8[1024](); - StringView bufferView = *(.)&buffer; - while (!proc.HasExited || !output.IsEmpty || !error.IsEmpty) + while (!proc.HasExited || !outputSr.EndOfStream) { - while (output.TryRead(buffer) case .Ok(let val) && val > 0) - str.Append(bufferView[.. 0) - str.Append(bufferView[..