diff options
Diffstat (limited to 'src/buildstream/_frontend/cli.py')
-rw-r--r-- | src/buildstream/_frontend/cli.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py index ff68af66d..9cf2aabe7 100644 --- a/src/buildstream/_frontend/cli.py +++ b/src/buildstream/_frontend/cli.py @@ -1234,14 +1234,6 @@ def artifact_checkout(app, force, deps, integrate, hardlinks, tar, compression, if compression: click.echo("ERROR: --compression can only be provided if --tar is provided", err=True) sys.exit(-1) - else: - if directory is None: - location = os.path.abspath(os.path.join(os.getcwd(), target)) - if location[-4:] == ".bst": - location = location[:-4] - else: - location = directory - tar = False else: location = tar try: @@ -1264,6 +1256,14 @@ def artifact_checkout(app, force, deps, integrate, hardlinks, tar, compression, if not target: raise AppError('Missing argument "ELEMENT".') + if not tar: + if directory is None: + location = os.path.abspath(os.path.join(os.getcwd(), target)) + if location[-4:] == ".bst": + location = location[:-4] + else: + location = directory + app.stream.checkout( target, location=location, |