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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 5d65a31a9..09e6dfb17 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -207,7 +207,7 @@ class Stream:
# Assert we have everything we need built, using the element
# definitions to control the execution environment only.
- if not element._has_all_sources_in_source_cache():
+ if scope == Scope.BUILD and not element._has_all_sources_in_source_cache():
raise StreamError(
"Sources for element {} are not cached." "Element must be fetched.".format(element._get_full_name())
)