diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-28 22:14:42 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-28 23:28:04 +0200 |
commit | 00f1c87d3d841f5b24c89d370868cf0306896877 (patch) | |
tree | 8b08c9a1c88ce19a3a0170a950514d320f11ac66 /crates/driver/src/driver.rs | |
parent | 3c8227c34b08eeff6d1b016d08bd29a17d3ad251 (diff) | |
download | rebel-00f1c87d3d841f5b24c89d370868cf0306896877.tar rebel-00f1c87d3d841f5b24c89d370868cf0306896877.zip |
Pass full Output path to runner
Concatenate TASK_DESTDIR with output path in driver instead of runner to
reduce amount of shared logic between driver and runner.
Diffstat (limited to 'crates/driver/src/driver.rs')
-rw-r--r-- | crates/driver/src/driver.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/driver/src/driver.rs b/crates/driver/src/driver.rs index f43f8e8..683e111 100644 --- a/crates/driver/src/driver.rs +++ b/crates/driver/src/driver.rs @@ -268,10 +268,12 @@ impl<'ctx> Driver<'ctx> { .output .iter() .map(|(name, Output { path, .. })| { - ( - name.clone(), - path.as_ref().map(String::as_str).unwrap_or(".").to_string(), - ) + let output_path = if let Some(path) = path { + paths::join(&[paths::TASK_DESTDIR, path]) + } else { + paths::TASK_DESTDIR.to_string() + }; + (name.clone(), output_path) }) .collect(); |