From 1455a0594e5beccde4a2381ebc4d37bdc7db17e0 Mon Sep 17 00:00:00 2001 From: Young-Flash Date: Mon, 28 Oct 2024 17:34:32 +0800 Subject: [PATCH] fix moon upgrade missing binary --- crates/moonbuild/src/upgrade.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/moonbuild/src/upgrade.rs b/crates/moonbuild/src/upgrade.rs index e80c0c82..07e9b8f1 100644 --- a/crates/moonbuild/src/upgrade.rs +++ b/crates/moonbuild/src/upgrade.rs @@ -219,6 +219,10 @@ pub fn do_upgrade(root: &'static str) -> Result { let rt = tokio::runtime::Runtime::new()?; rt.block_on(async { let items = [ + "moonbit.h", + "moonbit-fundamental.h", + "libmoonbitrun.o", + "libtcc1.a", "moon", "moonc", "moonfmt", @@ -227,12 +231,13 @@ pub fn do_upgrade(root: &'static str) -> Result { "moondoc", "moon_cove_report", "mooncake", - "core.zip",]; + "core.zip", + ]; let urls = items .iter() .map(|item| { if *item != "core.zip" { - format!("{}/{}/{}{}", root, os_arch(), item, if os_arch() == "windows" { ".exe" } else { "" }) + format!("{}/{}/{}{}", root, os_arch(), item, if os_arch() == "windows" && !item.contains(".") { ".exe" } else { "" }) } else { format!("{}/{}", root, item) }