add new command state in execution context
This commit is contained in:
parent
5291c9fcec
commit
2cf6552f5d
1 changed files with 11 additions and 0 deletions
|
|
@ -29,6 +29,17 @@ pub struct CommandCache {
|
|||
cache: Mutex<HashMap<CommandCacheKey, CommandOutput>>,
|
||||
}
|
||||
|
||||
enum CommandState<'a> {
|
||||
Cached(CommandOutput),
|
||||
Deferred {
|
||||
process: Option<Result<Child, std::io::Error>>,
|
||||
command: &'a mut BootstrapCommand,
|
||||
stdout: OutputMode,
|
||||
stderr: OutputMode,
|
||||
executed_at: &'a Location<'a>,
|
||||
},
|
||||
}
|
||||
|
||||
impl CommandCache {
|
||||
pub fn new() -> Self {
|
||||
Self { cache: Mutex::new(HashMap::new()) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue