summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-09-14 13:48:08 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-09-19 16:16:28 +0100
commit096a315e7d58a01f0ab4e1749d6c673fa676ac06 (patch)
treea161500337dd51c3c0945bdb4c086c11a3d3e977
parent6eacca219fe79c0cce97fa0f5c33b942904bc8e6 (diff)
downloadbuildstream-096a315e7d58a01f0ab4e1749d6c673fa676ac06.tar.gz
sandbox.py: Re-add the __allow_real_directory check, to stop us using CASCache on unsupported elements
-rw-r--r--buildstream/sandbox/sandbox.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/sandbox/sandbox.py b/buildstream/sandbox/sandbox.py
index 9d34f0195..63b1ff879 100644
--- a/buildstream/sandbox/sandbox.py
+++ b/buildstream/sandbox/sandbox.py
@@ -140,7 +140,7 @@ class Sandbox():
if not self._vdir:
# BST_CAS_DIRECTORIES is a deliberately hidden environment variable which
# can be used to switch on CAS-based directories for testing.
- if 'BST_CAS_DIRECTORIES' in os.environ:
+ if 'BST_CAS_DIRECTORIES' in os.environ and not self.__allow_real_directory:
self._vdir = CasBasedDirectory(self.__context, ref=None)
else:
self._vdir = FileBasedDirectory(self._root)