Raise error if process fails in execute_live
This commit is contained in:
parent
afec1fdd0c
commit
c5af5c9198
1 changed files with 3 additions and 1 deletions
|
@ -122,9 +122,11 @@ class ExecutionApi:
|
||||||
print(command)
|
print(command)
|
||||||
else:
|
else:
|
||||||
process = Popen(command, shell=shell)
|
process = Popen(command, shell=shell)
|
||||||
outs, _ = process.communicate()
|
outs, errs = process.communicate()
|
||||||
while outs is not None:
|
while outs is not None:
|
||||||
stdout.buffer.write(outs)
|
stdout.buffer.write(outs)
|
||||||
|
if errs is not None:
|
||||||
|
raise RuntimeError(f"Execute live '{command}' failed with code {process.returncode}\n{errs}")
|
||||||
|
|
||||||
|
|
||||||
class EnvironmentApi:
|
class EnvironmentApi:
|
||||||
|
|
Loading…
Reference in a new issue