The build subprocess' output is buffered (but not line buffered). As a result partial lines are inserted. If the previous insert ended in the middle of the pattern we are looking for, the search will fail (end missing). When the second part is inserted, the search will also fail because this time we start looking from the middle of the pattern (beginning missing). To work around that, we always match from the beginning of the line.
6.9 KiB
6.9 KiB