summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-06-11 10:12:14 +0100
committerAngelos Evripiotis <jevripiotis@bloomberg.net>2019-06-12 10:07:45 +0100
commit8cab8a1054207a79cb5f09b78234309f56a53220 (patch)
treee5f1d4c8f98e23a87b8eef59d094c393a718a361
parenta86657c277e574bffa3f7b03aa7028cf4c68eaf3 (diff)
downloadbuildstream-8cab8a1054207a79cb5f09b78234309f56a53220.tar.gz
cascache: add_object, assert path if link_directly
-rw-r--r--src/buildstream/_cas/cascache.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py
index 005fd98a6..d9832feec 100644
--- a/src/buildstream/_cas/cascache.py
+++ b/src/buildstream/_cas/cascache.py
@@ -381,6 +381,9 @@ class CASCache():
# Exactly one of the two parameters has to be specified
assert (path is None) != (buffer is None)
+ # If we're linking directly, then path must be specified.
+ assert (not link_directly) or (link_directly and path)
+
if digest is None:
digest = remote_execution_pb2.Digest()