From a628411f9bb14a7aae5fd3a1ad3230c388d4acf2 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Tue, 26 Mar 2019 11:31:52 -0400 Subject: Rename repository argument to 'repos' This more accurately reflects its contents, however does mean that if you are using an environment variable to define repository locations it needs to be updated. --- dotfiles/cli.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dotfiles/cli.py b/dotfiles/cli.py index cd9b187..c58b40f 100644 --- a/dotfiles/cli.py +++ b/dotfiles/cli.py @@ -64,17 +64,24 @@ CONTEXT_SETTINGS = dict(auto_envvar_prefix='DOTFILES', @click.group(context_settings=CONTEXT_SETTINGS) -@click.option('--repo', '-r', type=click.Path(), multiple=True, - help='A repository path.', default=['~/Dotfiles'], +@click.option('--repos', '-r', type=click.Path(), multiple=True, + help='Repository locations.', default=['~/Dotfiles'], show_default=True) @click.version_option(None, '-v', '--version') @click.pass_context -def cli(ctx, repo): +def cli(ctx, repos): """Dotfiles is a tool to make managing your dotfile symlinks in $HOME easy, allowing you to keep all your dotfiles in a single directory. """ + + # temporary notice for folks tracking git + import os + if os.environ.get('DOTFILES_REPO'): + click.echo("Error: repository variable has changed to \"DOTFILES_REPOS\", please update") + exit(-1) + try: - ctx.obj = Repositories(repo) + ctx.obj = Repositories(repos) except FileNotFoundError as e: raise click.ClickException('Directory not found: %s' % e) -- cgit v1.2.3