From b0819c9bc05ed539d6f84f07eb8bf2ee89b1e40c Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Thu, 8 Feb 2024 15:17:48 +0100 Subject: support uninstalling modules --- xmake/modules/target/action/uninstall/main.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xmake/modules/target/action/uninstall/main.lua b/xmake/modules/target/action/uninstall/main.lua index cc5feb3ac..daa23917c 100644 --- a/xmake/modules/target/action/uninstall/main.lua +++ b/xmake/modules/target/action/uninstall/main.lua @@ -26,6 +26,12 @@ function _uninstall_files(target) end end +-- uninstall modules +function _uninstall_modules(target, opt) + local moduledir = path.join(target:installdir(), opt and opt.moduledir or "modules") + os.vrm(moduledir) +end + -- the builtin uninstall main entry function main(target, opt) @@ -47,6 +53,9 @@ function main(target, opt) end end + -- remove modules + _uninstall_modules(target, opt) + -- uninstall the other files _uninstall_files(target) end -- cgit v1.3.1