diff options
author | Phil Dawson <phil.dawson@codethink.co.uk> | 2018-12-06 14:36:45 +0000 |
---|---|---|
committer | Phil Dawson <phil.dawson@codethink.co.uk> | 2018-12-12 13:55:19 +0000 |
commit | 733aab53ce07c0b36a460eb55b5eb629197b4faa (patch) | |
tree | 6e5e5c9ddd61094156f7ecc0eb602113e5db8cd6 /buildstream/_frontend/cli.py | |
parent | d55b9e398ca4d95e2ffe70580cddf7911c161d20 (diff) | |
download | buildstream-733aab53ce07c0b36a460eb55b5eb629197b4faa.tar.gz |
Add --force / -f option to source-checkout command
Diffstat (limited to 'buildstream/_frontend/cli.py')
-rw-r--r-- | buildstream/_frontend/cli.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py index ae640753d..048cce735 100644 --- a/buildstream/_frontend/cli.py +++ b/buildstream/_frontend/cli.py @@ -725,6 +725,8 @@ def checkout(app, element, location, force, deps, integrate, hardlinks, tar): # Source Checkout Command # ################################################################## @cli.command(name='source-checkout', short_help='Checkout sources for an element') +@click.option('--force', '-f', default=False, is_flag=True, + help="Allow files to be overwritten") @click.option('--except', 'except_', multiple=True, type=click.Path(readable=False), help="Except certain dependencies") @@ -740,7 +742,7 @@ def checkout(app, element, location, force, deps, integrate, hardlinks, tar): type=click.Path(readable=False)) @click.argument('location', type=click.Path(), required=False) @click.pass_obj -def source_checkout(app, element, location, deps, fetch_, except_, tar): +def source_checkout(app, element, location, force, deps, fetch_, except_, tar): """Checkout sources of an element to the specified location """ if not element and not location: @@ -760,6 +762,7 @@ def source_checkout(app, element, location, deps, fetch_, except_, tar): app.stream.source_checkout(element, location=location, + force=force, deps=deps, fetch=fetch_, except_targets=except_, |