summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Winship <douglas.winship@codethink.co.uk>2020-07-10 16:00:17 +0100
committerDouglas Winship <douglas.winship@codethink.co.uk>2020-07-10 16:08:41 +0100
commit0301ec2ed104bf54ba715aad055f5f7cd8d729dc (patch)
tree43629d9f62f5a1bcb9522bfc0b967a6e1d360100
parent9330cda5ccc718e5bd9e9479a5dd457012b5d3bf (diff)
downloadbuildstream-0301ec2ed104bf54ba715aad055f5f7cd8d729dc.tar.gz
Don't strip '.bst' from user-supplied checkout dir
Allows user to supply a directory name ending in '.bst' for "bst artifact checkout", without buildstream removing '.bst' from the end. (It's only supposed to remove '.bst' if the user didn't supply a directory name, and buildstream is auto-generating a name based on the target name.)
-rw-r--r--src/buildstream/_frontend/cli.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index 0adfdd84a..b9cb26666 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -1249,10 +1249,10 @@ def artifact_checkout(app, force, deps, integrate, hardlinks, tar, compression,
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
- if location[-4:] == ".bst":
- location = location[:-4]
tar = False
else:
location = tar