def _rewrite_env_file(path, initial_content):
    """Rewrite the environment variable file.

    :param path: the path of the file
    :param initial_content: the original content of the file
    """
    with open(path, 'w+') as env_file:
        for line in initial_content:
            env_file.write(line)
