diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-11-16 20:52:34 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-11-16 20:52:34 +0100 |
commit | 1ad4750948ab49900b1b6ff5b455c11ebe7470eb (patch) | |
tree | d72737a8e045dbadb734425d687f2a09f0c7453b /crates/driver/src/context.rs | |
parent | bd8479a1ebf3862c13909e270ddd6179d9a24591 (diff) | |
download | rebel-1ad4750948ab49900b1b6ff5b455c11ebe7470eb.tar rebel-1ad4750948ab49900b1b6ff5b455c11ebe7470eb.zip |
driver: pass set of tasks to force-run to driver instance
Diffstat (limited to 'crates/driver/src/context.rs')
-rw-r--r-- | crates/driver/src/context.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/crates/driver/src/context.rs b/crates/driver/src/context.rs index 3a40102..2f29aed 100644 --- a/crates/driver/src/context.rs +++ b/crates/driver/src/context.rs @@ -17,7 +17,8 @@ use common::{ use crate::{ args::*, - parse, paths, + parse::{self, TaskFlags}, + paths, pin::{self, Pins}, task::*, }; @@ -353,8 +354,8 @@ impl Context { }) } - pub fn parse<'ctx>(&'ctx self, s: &str) -> error::Result<TaskRef> { - let (parsed, _flags) = parse::parse_task_with_flags(s).context("Invalid task syntax")?; + pub fn parse<'ctx>(&'ctx self, s: &str) -> error::Result<(TaskRef, TaskFlags)> { + let (parsed, flags) = parse::parse_task_with_flags(s).context("Invalid task syntax")?; let recipe = parsed.recipe.to_string(); let task = parsed.task.to_string(); @@ -383,8 +384,11 @@ impl Context { args.set("target", Some(plat)); } - self.task_ref(ctx_id, &args) - .with_context(|| format!("Failed to instantiate task {}", id)) + let task_ref = self + .task_ref(ctx_id, &args) + .with_context(|| format!("Failed to instantiate task {}", id))?; + + Ok((task_ref, flags)) } fn map_args<'ctx, 'args>( |