From 21cb588cc0f6b2f84a694f1ec7ec907edf118cab Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 21 Feb 2024 23:31:12 +0800 Subject: [PATCH] fix install --- packages/m/msys2-base/xmake.lua | 9 ++++----- packages/m/msys2/xmake.lua | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/m/msys2-base/xmake.lua b/packages/m/msys2-base/xmake.lua index 59f8df0aa..b062c302d 100644 --- a/packages/m/msys2-base/xmake.lua +++ b/packages/m/msys2-base/xmake.lua @@ -20,18 +20,17 @@ package("msys2-base") package:addenv("PATH", "usr/bin") -- starting MSYS2 for the first time - local uname = path.join(package:installdir("usr/bin"), "uname.exe") - os.vrunv(uname, {"-a"}) + local bash = path.join(package:installdir("usr/bin"), "bash.exe") + os.vrunv(bash, {"-leo", "pipefail", "-c", "uname -a"}) -- updating packages - local pacman = path.join(package:installdir("usr/bin"), "pacman.exe") - try { function () os.vrunv(pacman, {"-Syuu", "--overwrite", "*"}) end} + try { function () os.vrunv(bash, {"-leo", "pipefail", "-c", "pacman --noconfirm -Syuu --overwrite *"}) end} -- killing remaining tasks os.vrunv("taskkill", {"/F", "/FI", "MODULES eq msys-2.0.dll"}) -- final system upgrade - os.vrunv(pacman, {"-Syuu", "--overwrite", "*"}) + os.vrunv(bash, {"-leo", "pipefail", "-c", "pacman --noconfirm -Syuu --overwrite *"}) end) on_test(function (package) diff --git a/packages/m/msys2/xmake.lua b/packages/m/msys2/xmake.lua index c0a310ad6..e2ba6b974 100644 --- a/packages/m/msys2/xmake.lua +++ b/packages/m/msys2/xmake.lua @@ -12,12 +12,12 @@ package("msys2") local msystem = package:config("msystem") if msystem then package:addenv("MSYSTEM", msystem) - local pacman = path.join(msys2_base:installdir("usr/bin"), "pacman.exe") + local bash = path.join(msys2_base:installdir("usr/bin"), "bash.exe") if msystem == "MINGW64" then - os.vrunv(pacman, {"--noconfirm", "-S", "--needed", "--overwrite", "*", "mingw-w64-x86_64-toolchain"}) + os.vrunv(bash, {"-leo", "pipefail", "-c", "pacman --noconfirm -S --needed --overwrite * mingw-w64-x86_64-toolchain"}) package:addenv("PATH", msys2_base:installdir("mingw64/bin")) elseif msystem == "MINGW32" then - os.vrunv(pacman, {"--noconfirm", "-S", "--needed", "--overwrite", "*", "mingw-w64-i686-toolchain"}) + os.vrunv(bash, {"-leo", "pipefail", "-c", "pacman --noconfirm -S --needed --overwrite * mingw-w64-i686-toolchain"}) package:addenv("PATH", msys2_base:installdir("mingw32/bin")) end end