mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Add --version flag, fix #92
This commit is contained in:
parent
05d2beb3dc
commit
6841b25264
1 changed files with 2 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ import sys
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
from . import log
|
from . import __version__, log
|
||||||
from .storage import storage_names
|
from .storage import storage_names
|
||||||
from .sync import StorageEmpty, SyncConflict, sync
|
from .sync import StorageEmpty, SyncConflict, sync
|
||||||
from .utils import expand_path, get_class_init_args, parse_options, split_dict
|
from .utils import expand_path, get_class_init_args, parse_options, split_dict
|
||||||
|
|
@ -242,6 +242,7 @@ def _create_app():
|
||||||
@click.option('--verbosity', '-v', default='INFO',
|
@click.option('--verbosity', '-v', default='INFO',
|
||||||
callback=validate_verbosity,
|
callback=validate_verbosity,
|
||||||
help='Either CRITICAL, ERROR, WARNING, INFO or DEBUG')
|
help='Either CRITICAL, ERROR, WARNING, INFO or DEBUG')
|
||||||
|
@click.version_option(version=__version__)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
@catch_errors
|
@catch_errors
|
||||||
def app(ctx, verbosity):
|
def app(ctx, verbosity):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue