diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-06-11 10:12:14 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-06-27 12:34:43 +0000 |
commit | a2dcb69cb45bbaf1d63347ebd66ea21c46ee0c44 (patch) | |
tree | e0ff08bd98802596291eb6caedb564354d717413 | |
parent | 4b941ff389707d1f6a5be1f422f2831ae9cc32c3 (diff) | |
download | buildstream-a2dcb69cb45bbaf1d63347ebd66ea21c46ee0c44.tar.gz |
cascache: add_object, assert path if link_directly
-rw-r--r-- | src/buildstream/_cas/cascache.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py index ba520851c..53f6029db 100644 --- a/src/buildstream/_cas/cascache.py +++ b/src/buildstream/_cas/cascache.py @@ -367,6 +367,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() |