summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2023-03-06 08:39:55 +0100
committerGitHub <[email protected]>2023-03-06 08:39:55 +0100
commit49cb1b19a35ebe87018ea4ef60ed623c35e3d294 (patch)
tree558e181059c5a48bb5852e42aefc662cd4ed9f3f
parent2a67018079856b3e90f16693f7702b258a3026f7 (diff)
Update find_package.lua
-rw-r--r--xmake/modules/package/manager/cargo/find_package.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/xmake/modules/package/manager/cargo/find_package.lua b/xmake/modules/package/manager/cargo/find_package.lua
index 93576d775..ec351d84e 100644
--- a/xmake/modules/package/manager/cargo/find_package.lua
+++ b/xmake/modules/package/manager/cargo/find_package.lua
@@ -29,11 +29,7 @@ import("lib.detect.find_file")
-- get cargo registry directory
function _get_cargo_registrydir()
- if is_host("windows") then
- return "$(env USERPROFILE)\\.cargo\\registry"
- else
- return "~/.cargo/registry"
- end
+ return path.join(is_host("windows") and os.getenv("USERPROFILE") or "~", ".cargo", "registry")
end
-- get the Cargo.toml of package