summaryrefslogtreecommitdiff
path: root/src/buildstream/_stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_stream.py')
-rw-r--r--src/buildstream/_stream.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index c71bec80a..4824c7d81 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -188,6 +188,12 @@ class Stream():
# in which case we just blindly trust the directory, using the element
# definitions to control the execution environment only.
if directory is None:
+
+ if not element._source_cached():
+ raise StreamError(
+ "Sources for element {} are not cached."
+ "Element must be fetched.".format(element._get_full_name()))
+
missing_deps = [
dep for dep in self._pipeline.dependencies([element], scope)
if not dep._cached()