summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/private/action/require/impl/package.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index 90e34fcef..8e11b7c73 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -1652,6 +1652,12 @@ function load_packages(requires, opt)
-- we need to reload packages with new resolved deps if there are some dep conflicts
if not table.empty(resolvedinfo) then
+ for _, package in ipairs(packages) do
+ local installdir = package:installdir({readonly = true})
+ if os.isdir(installdir) and os.emptydir(installdir) then
+ os.tryrm(installdir, {emptydirs = true})
+ end
+ end
unique = {}
packages = {}
_memcache():clear()