Skip to content

Commit 0204508

Browse files
authored
Merge pull request #5511 from xmake-io/package
Improve invalid path for package
2 parents ce3d162 + 688514b commit 0204508

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Changes
1212

13+
* [#5507](https://github.com/xmake-io/xmake/issues/5507): Use treeless to improve git.clone
14+
1315
### Bugs fixed
1416

1517
* [#4750](https://github.com/xmake-io/xmake/issues/4750): Fix compile_commands generator for `xmake tests`
@@ -1875,6 +1877,8 @@
18751877

18761878
### 改进
18771879

1880+
* [#5507](https://github.com/xmake-io/xmake/issues/5507): 改进 git clone 下载速度
1881+
18781882
### Bugs 修复
18791883

18801884
* [#4750](https://github.com/xmake-io/xmake/issues/4750): 修复 compile_commands 生成器,支持 `xmake tests`

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)