Skip to content

Commit 688514b

Browse files
committed
fix invalid path
1 parent 0783a48 commit 688514b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xmake/core/package/package.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,8 @@ function _instance:cachedir()
783783
--
784784
local name = self:displayname():lower():gsub("::", "_"):gsub("#", "_")
785785
local version_str = self:version_str()
786-
if self:is_thirdparty() then
787-
-- strip `>= <=`
786+
-- strip invalid characters on windows, e.g. `>= <=`
787+
if is_host("windows") then
788788
version_str = version_str:gsub("[>=<]", "")
789789
end
790790
if self:is_local() then
@@ -812,8 +812,8 @@ function _instance:installdir(...)
812812
end
813813
local version_str = self:version_str()
814814
if version_str then
815-
if self:is_thirdparty() then
816-
-- strip `>= <=`
815+
-- strip invalid characters on windows, e.g. `>= <=`
816+
if is_host("windows") then
817817
version_str = version_str:gsub("[>=<]", "")
818818
end
819819
installdir = path.join(installdir, version_str)

0 commit comments

Comments
 (0)