def cmd_output_mocked_pre_commit_home(*args, tempdir_factory, pre_commit_home=None, env=None, **kwargs):
    if (pre_commit_home is None):
        pre_commit_home = tempdir_factory.get()
    env = (env if (env is not None) else os.environ)
    kwargs.setdefault('stderr', subprocess.STDOUT)
    env = dict(env, PRE_COMMIT_HOME=pre_commit_home)
    (ret, out, _) = cmd_output(*args, env=env, **kwargs)
    return (ret, out.replace('\r\n', '\n'), None)
def cmd_output_mocked_pre_commit_home(*args, tempdir_factory, pre_commit_home=None, env=None, **kwargs):
    if (pre_commit_home is None):
        pre_commit_home = tempdir_factory.get()
    env = (env if (env is not None) else os.environ)
    kwargs.setdefault('stderr', subprocess.STDOUT)
    env = dict(env, PRE_COMMIT_HOME=pre_commit_home)
    (ret, out, _) = cmd_output(*args, env=env, **kwargs)
    return (ret, out.replace('\r\n', '\n'), None)