Here's a fun error for y'all: https://paste.ecorous.org/dimozegebu
And here's the code that goes with it:
#[tauri::command]
async fn launch(name: &str) -> Result<(), String> {
let config = config();
let instance_a = Instance::from_path(config.get_instances_path().join(name));
if instance_a.is_err() {
return Err(instance_a.unwrap_err().to_string())
}
let instance = instance_a.unwrap();
let components = merge_components(&config, &instance.config.components).await.unwrap();
let prepared = prepare_launch(&config, &instance, &components, LaunchOptions::default()).await.unwrap();
let launch = prepared.launch(true).await;
if (launch.is_err()) {
return Err(launch.unwrap_err().to_string());
}
Ok(())
}