From d95ec773ad650640e9bb1aa837fc71e12d1d0dbb Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Wed, 25 Aug 2021 22:14:55 +0200 Subject: [PATCH] fix(misc): fix arch naming on windows installer --- scripts/build_windows_installer.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/build_windows_installer.rs b/scripts/build_windows_installer.rs index d033c96..ac6969e 100644 --- a/scripts/build_windows_installer.rs +++ b/scripts/build_windows_installer.rs @@ -61,6 +61,13 @@ fn main() { let espanso_toml = espanso_toml_str .parse::() .expect("unable to parse Cargo.toml"); + + let arch = envmnt::get_or_panic("BUILD_ARCH"); + let arch = if arch == "current" { + std::env::consts::ARCH + } else { + &arch + }; // Populating template variables let mut iss_setup = template; @@ -106,7 +113,7 @@ fn main() { ); iss_setup = iss_setup.replace( "{{{output_name}}}", - &format!("{}-{}", INSTALLER_NAME, envmnt::get_or_panic("BUILD_ARCH")), + &format!("{}-{}", INSTALLER_NAME, arch), ); iss_setup = iss_setup.replace( "{{{executable_path}}}",