def capture_build_info(line, lines_iter):
    """
    Helper method to capture the build information
    """
    build_info = [line]
    while not lines_iter.peek().startswith('Input'):
        build_info.append(next(lines_iter))
    return '\n'.join(build_info)