def diff(): repo = Path(REPO_PATH).joinpath(VIM_FILES[0][0]).expanduser() system = Path(VIM_FILES[0][1]).expanduser() differ = 'colordiff' code, _, _ = call(['which', 'colordiff']) if code: differ = 'diff' code, out, err = call([differ, str(repo), str(system)]) click.echo(out)
def update(): repo_path = Path(TOP_FOLDER) click.echo('Updating...') code, out, err = call(['git', '-C', str(repo_path), 'pull']) if code: message = err or out raise UpdateError(message) click.echo(out, nl=False)