summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2023-03-06 08:31:32 +0100
committerGitHub <[email protected]>2023-03-06 08:31:32 +0100
commit2a67018079856b3e90f16693f7702b258a3026f7 (patch)
tree323015080773c0a84b80ac0bdf0e74d6d9569a46
parent8c1523adbcc37c3e020433faada44e8825bf99b6 (diff)
Fix cargo::find_package for Windows
-rw-r--r--xmake/modules/package/manager/cargo/find_package.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/cargo/find_package.lua b/xmake/modules/package/manager/cargo/find_package.lua
index c6b2cc10f..93576d775 100644
--- a/xmake/modules/package/manager/cargo/find_package.lua
+++ b/xmake/modules/package/manager/cargo/find_package.lua
@@ -29,7 +29,11 @@ import("lib.detect.find_file")
-- get cargo registry directory
function _get_cargo_registrydir()
- return "~/.cargo/registry"
+ if is_host("windows") then
+ return "$(env USERPROFILE)\\.cargo\\registry"
+ else
+ return "~/.cargo/registry"
+ end
end
-- get the Cargo.toml of package