summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-02-12 00:40:37 +0800
committerruki <[email protected]>2025-02-12 00:40:37 +0800
commitb509baeaf00de64d57f0fa1171e4c3eaf94e0dd2 (patch)
tree9f030d19dc0f0ad7729ff1d76d2c2b2d4451f736
parent5ac4306eef484bf86b35da159d03ea8cbeebe286 (diff)
fix cachedir
-rw-r--r--xmake/core/package/package.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 9c505fdb5..5b2a91be8 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -859,7 +859,7 @@ function _instance:cachedir()
local name = self:displayname():lower():gsub("::", "_"):gsub("#", "_")
local version_str = self:version_str()
-- strip invalid characters on windows, e.g. `>= <=`
- if os.is_host("windows") then
+ if version_str and os.is_host("windows") then
version_str = version_str:gsub("[>=<|%*]", "")
end
if self:is_local() then