diff --git a/bin/src/modules/binarize/mod.rs b/bin/src/modules/binarize/mod.rs index 892f490c..9180b935 100644 --- a/bin/src/modules/binarize/mod.rs +++ b/bin/src/modules/binarize/mod.rs @@ -21,7 +21,6 @@ mod error; #[derive(Default)] pub struct Binarize { command: Option, - available: bool, } impl Module for Binarize { @@ -36,12 +35,10 @@ impl Module for Binarize { let hkcu = winreg::RegKey::predef(winreg::enums::HKEY_CURRENT_USER); let Ok(key) = hkcu.open_subkey("Software\\Bohemia Interactive\\binarize") else { report.warn(ToolsNotFound::code()); - self.available = false; return Ok(report); }; let Ok(path) = key.get_value::("path") else { report.warn(ToolsNotFound::code()); - self.available = false; return Ok(report); }; let path = PathBuf::from(path).join("binarize_x64.exe"); @@ -55,13 +52,12 @@ impl Module for Binarize { fn init(&mut self, _ctx: &Context) -> Result { let mut report = Report::new(); report.warn(PlatformNotSupported::code()); - self.available = false; Ok(report) } #[allow(clippy::too_many_lines)] fn pre_build(&self, ctx: &Context) -> Result { - if !self.available { + if self.command.is_none() { return Ok(Report::new()); } let mut targets = Vec::with_capacity(ctx.addons().len());