add new command state in execution context

This commit is contained in:
bit-aloo 2025-06-24 20:33:18 +05:30
parent 5291c9fcec
commit 2cf6552f5d
No known key found for this signature in database

View file

@ -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()) }