From 352a278daaad38b634c3cc6418e4875d6e75a0ef Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Sat, 2 Mar 2024 00:27:29 -0600 Subject: [PATCH] fix binarize not running on 1.11.1 (#663) --- bin/src/modules/binarize/mod.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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());