summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-11-21 09:21:27 +0100
committerJürg Billeter <j@bitron.ch>2019-11-27 16:21:45 +0100
commit364a316405ef820ac377255a9062019cb4ae9ae1 (patch)
treee67b77da690d445daf6d66abc827d0fee42828fd
parent5dedeb8db7242bf3e61d82b4070ca8006e56e889 (diff)
downloadbuildstream-364a316405ef820ac377255a9062019cb4ae9ae1.tar.gz
_sandboxreapi.py: Check that command exists
-rw-r--r--src/buildstream/sandbox/_sandboxreapi.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildstream/sandbox/_sandboxreapi.py b/src/buildstream/sandbox/_sandboxreapi.py
index 4989125b2..65f2eaeae 100644
--- a/src/buildstream/sandbox/_sandboxreapi.py
+++ b/src/buildstream/sandbox/_sandboxreapi.py
@@ -43,6 +43,11 @@ class SandboxREAPI(Sandbox):
# set up virtual dircetory
vdir = self.get_virtual_directory()
+ if not self._has_command(command[0], env):
+ raise SandboxCommandError(
+ "Staged artifacts do not provide command " "'{}'".format(command[0]), reason="missing-command"
+ )
+
# Ensure working directory exists
if len(cwd) > 1:
assert cwd.startswith("/")