You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:58:23 UTC
[buildstream] 05/06: cascache: add_object,
assert path if link_directly
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch aevri/win32_temptext
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 8cab8a1054207a79cb5f09b78234309f56a53220
Author: Angelos Evripiotis <je...@bloomberg.net>
AuthorDate: Tue Jun 11 10:12:14 2019 +0100
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 005fd98..d9832fe 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()