use super::*;
use std::str::FromStr;
pub struct Registry;
use crate::formulation_provider::CommandProvider;
use crate::providers::o2_rust_webapp::O2RustWebAppProvider;
impl Registry {
pub fn new() -> Self {
Registry {}
}
pub fn process(&self, formulation: Formulation) {
if let Ok(provider_with_context) = O2RustWebAppProvider::init_context() {
let mut cmds = O2RustWebAppProvider::get_commands(&provider_with_context);
for cmd in cmds.iter_mut() {
let status = cmd
.command
.spawn()
.expect("Failed to spawn command")
.wait()
.expect("Failed to wait on child");
println!("Command exited with status: {}", status);
}
}
}
}