diff options
| author | Arthur LAURENT <[email protected]> | 2024-02-08 15:17:48 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-02-08 15:19:23 +0100 |
| commit | b0819c9bc05ed539d6f84f07eb8bf2ee89b1e40c (patch) | |
| tree | e054afc6a71253ec1cc1d99d9a1b6aa43df93ecf | |
| parent | 7b6d069488f8d7418f01e7f8f87dc34d0b502cd6 (diff) | |
support uninstalling modules
| -rw-r--r-- | xmake/modules/target/action/uninstall/main.lua | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
