summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/package/package.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index c6676327f..56191054c 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -783,8 +783,8 @@ function _instance:cachedir()
--
local name = self:displayname():lower():gsub("::", "_"):gsub("#", "_")
local version_str = self:version_str()
- if self:is_thirdparty() then
- -- strip `>= <=`
+ -- strip invalid characters on windows, e.g. `>= <=`
+ if is_host("windows") then
version_str = version_str:gsub("[>=<]", "")
end
if self:is_local() then
@@ -812,8 +812,8 @@ function _instance:installdir(...)
end
local version_str = self:version_str()
if version_str then
- if self:is_thirdparty() then
- -- strip `>= <=`
+ -- strip invalid characters on windows, e.g. `>= <=`
+ if is_host("windows") then
version_str = version_str:gsub("[>=<]", "")
end
installdir = path.join(installdir, version_str)