aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@jbernard.io> 2019-03-26 11:31:52 -0400
committerGravatar Jon Bernard <jbernard@jbernard.io> 2019-03-26 11:32:56 -0400
commita628411f9bb14a7aae5fd3a1ad3230c388d4acf2 (patch)
tree952c86ff303ca0299dadee375b96c16f0cccfea9
parent72294dcf14c9c19464442cfbd5f5896b3bb05518 (diff)
downloaddotfiles-a628411f9bb14a7aae5fd3a1ad3230c388d4acf2.tar.gz
dotfiles-a628411f9bb14a7aae5fd3a1ad3230c388d4acf2.tar.bz2
dotfiles-a628411f9bb14a7aae5fd3a1ad3230c388d4acf2.zip
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.
-rw-r--r--dotfiles/cli.py15
1 files 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)