Skip to content
Myr

cmd_init.py

This file

Path

examples/complex/complex/commands/cmd_init.py

13 lines · 389 bytes · Python

Last changed by

Not known.

History of this file

Take it

1import click2from complex.cli import pass_context345@click.command('init', short_help='Initializes a repo.')6@click.argument('path', required=False, type=click.Path(resolve_path=True))7@pass_context8def cli(ctx, path):9    """Initializes a repository."""10    if path is None:11        path = ctx.home12    ctx.log('Initialized the repository in %s',13            click.format_filename(path))