summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-04-04 12:22:35 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-04-04 12:22:35 +0200
commitdf661c46fa92751e13304c7936c2e0f39d0b2be2 (patch)
tree48dc6f5e070d610974d3d779bc8bb468839e6dbc /src
parent1a792c68960fe2d158528fd2349ddb29c593eb08 (diff)
downloadrebel-df661c46fa92751e13304c7936c2e0f39d0b2be2.tar
rebel-df661c46fa92751e13304c7936c2e0f39d0b2be2.zip
runc: return error on task failure
Diffstat (limited to 'src')
-rw-r--r--src/runner/runc/run.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/runner/runc/run.rs b/src/runner/runc/run.rs
index 897fb47..cb6e37d 100644
--- a/src/runner/runc/run.rs
+++ b/src/runner/runc/run.rs
@@ -64,19 +64,20 @@ pub fn handle_task(task: TaskRef, task_def: Task) -> Result<(), Error> {
.current_dir("build/tmp/runc")
.output()?;
- if output.status.success() {
- println!(
- "{}:\n{}",
- task,
- String::from_utf8_lossy(output.stdout.as_slice()),
- );
- } else {
+ if !output.status.success() {
println!(
"{}:\n{}",
task,
String::from_utf8_lossy(output.stderr.as_slice()),
);
+ return Err(Error::String("Task failed".to_string()));
}
+ println!(
+ "{}:\n{}",
+ task,
+ String::from_utf8_lossy(output.stdout.as_slice()),
+ );
+
Ok(())
}