def extract_envars(raw):
    """
    Returns a list of environment variables given a string containing
    NAME=VALUE definitions on separate lines.
    """
    result = []
    for line in raw.split('\n'):
        definition = line.split('=', 1)
        if len(definition) == 2:
            result.append([definition[0].strip(), definition[1].strip()])
    return result
