pass active plugins to fomod installer
This commit is contained in:
@@ -5,7 +5,7 @@ use std::{
|
||||
};
|
||||
|
||||
use globset::{Glob, GlobSet, GlobSetBuilder};
|
||||
use log::warn;
|
||||
use log::{debug, trace, warn};
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::{
|
||||
@@ -114,14 +114,21 @@ fn determain_mod_kind(
|
||||
}
|
||||
|
||||
fn install_fomod(
|
||||
_instance: &ModdedInstance,
|
||||
instance: &ModdedInstance,
|
||||
module_config_path: impl AsRef<Path>,
|
||||
mod_root: impl AsRef<Path>,
|
||||
) -> anyhow::Result<Vec<ModFile>> {
|
||||
debug!("Running FOmod installer");
|
||||
let module_config = fomod::Config::load_from_file(module_config_path)?;
|
||||
|
||||
// TODO: add active plugins from instance config
|
||||
let files = run_fomod_installer(module_config, &[], install_prompt::prompt)
|
||||
let active_plugins: Vec<_> = instance
|
||||
.active_plugins()
|
||||
.map(|e| e.to_string_lossy())
|
||||
.map(|e| e.to_string())
|
||||
.collect();
|
||||
|
||||
trace!("Current loded plugins: {:?}", active_plugins);
|
||||
let files = run_fomod_installer(module_config, &active_plugins, install_prompt::prompt)
|
||||
.map_err(|_| InststanceError::FomodRunInstaller)?;
|
||||
|
||||
let mod_files: Vec<_> = files
|
||||
|
||||
Reference in New Issue
Block a user