diff options
-rw-r--r-- | src/buildstream/_stream.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index 092b96128..fc83156f5 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -1158,9 +1158,12 @@ class Stream(): # Classify element and artifact strings target_elements, target_artifacts = self._classify_artifacts(targets) - if target_artifacts and not load_refs: - detail = '\n'.join(target_artifacts) - raise ArtifactElementError("Cannot perform this operation with artifact refs:", detail=detail) + if target_artifacts: + if not load_refs: + detail = '\n'.join(target_artifacts) + raise ArtifactElementError("Cannot perform this operation with artifact refs:", detail=detail) + if selection in (PipelineSelection.ALL, PipelineSelection.RUN): + raise StreamError("Error: '--deps {}' is not supported for artifact refs".format(selection)) # Load rewritable if we have any tracking selection to make rewritable = False |