From 80dcee00e9c5342a1cc1b27a3cb8b2092f335228 Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Wed, 24 Jan 2024 19:13:09 -0600 Subject: [PATCH] handle failed steps in hemtt launch --- Cargo.lock | 2 +- bin/Cargo.toml | 2 +- bin/src/commands/launch/mod.rs | 4 ++++ bin/src/executor.rs | 1 + bin/src/modules/sqf.rs | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3049787a..be0d22b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -879,7 +879,7 @@ dependencies = [ [[package]] name = "hemtt" -version = "1.11.0-rc3" +version = "1.11.0-rc4" dependencies = [ "ariadne", "clap", diff --git a/bin/Cargo.toml b/bin/Cargo.toml index 617c63b5..5835cbe7 100644 --- a/bin/Cargo.toml +++ b/bin/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hemtt" description = "HEMTT - Arma 3 Build Tool" -version = "1.11.0-rc3" +version = "1.11.0-rc4" edition = "2021" license = "GPL-2.0" authors = ["Brett Mayson "] diff --git a/bin/src/commands/launch/mod.rs b/bin/src/commands/launch/mod.rs index de894c1f..baf0e105 100644 --- a/bin/src/commands/launch/mod.rs +++ b/bin/src/commands/launch/mod.rs @@ -192,6 +192,10 @@ pub fn execute(matches: &ArgMatches) -> Result { report.merge(executor.run()?); + if report.failed() { + return Ok(report); + } + let prefix_folder = arma3dir.join(mainprefix); if !prefix_folder.exists() { std::fs::create_dir_all(&prefix_folder)?; diff --git a/bin/src/executor.rs b/bin/src/executor.rs index 48b62351..6c99537a 100644 --- a/bin/src/executor.rs +++ b/bin/src/executor.rs @@ -50,6 +50,7 @@ impl Executor { /// The exeuctor will run the `build` phases pub fn build(&mut self, write: bool) { self.stages.push("pre_build"); + info!("will write pbo: {}", write); if write { self.stages.push("build"); self.stages.push("post_build"); diff --git a/bin/src/modules/sqf.rs b/bin/src/modules/sqf.rs index a88b70df..88b542a4 100644 --- a/bin/src/modules/sqf.rs +++ b/bin/src/modules/sqf.rs @@ -86,7 +86,7 @@ impl Module for SQFCompiler { for new_report in reports { report.merge(new_report); } - info!("Compiled {} sqf files", counter.load(Ordering::Relaxed)); + info!("Validated {} sqf files", counter.load(Ordering::Relaxed)); Ok(report) } }