From dd707c074c69697893122155691aa0e06a05901c Mon Sep 17 00:00:00 2001 From: Angelos Evripiotis Date: Tue, 11 Jun 2019 10:12:14 +0100 Subject: cascache: add_object, assert path if link_directly --- src/buildstream/_cas/cascache.py | 3 +++ 1 file changed, 3 insertions(+) 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() -- cgit v1.2.1