Skip to content

Commit

Permalink
Attach click decorator to main
Browse files Browse the repository at this point in the history
  • Loading branch information
retr0h committed Jan 28, 2017
1 parent 5bd76bf commit c201acb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions gilt/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ class NotFoundError(Exception):
pass


def main():
""" gilt - A GIT layering tool. """
cli(obj={})


@click.group()
@click.option(
'--config',
Expand All @@ -52,7 +47,9 @@ def main():
help='Enable or disable debug mode. Default is disabled.')
@click.version_option(version=gilt.__version__)
@click.pass_context
def cli(ctx, config, debug): # pragma: no cover
def main(ctx, config, debug): # pragma: no cover
""" gilt - A GIT layering tool. """
ctx.obj = {}
ctx.obj['args'] = {}
ctx.obj['args']['debug'] = debug
ctx.obj['args']['config'] = config
Expand Down Expand Up @@ -89,4 +86,4 @@ def _setup(filename):
os.makedirs(working_dir)


cli.add_command(overlay)
main.add_command(overlay)

0 comments on commit c201acb

Please sign in to comment.