summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxq114 <[email protected]>2022-02-15 00:04:25 +0800
committerxq114 <[email protected]>2022-02-15 00:04:25 +0800
commiteb5856e2619957607e97c4f5f94badcc89a173b9 (patch)
treeec886a1df7cdfd7b780d5a795359601d7a796c37
parent15dba52da8585191d3e41a50b560810ac083364e (diff)
add git url besides https urls
-rw-r--r--xmake/actions/update/main.lua2
-rw-r--r--xmake/modules/private/action/update/fetch_version.lua1
2 files changed, 2 insertions, 1 deletions
diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua
index 6436a874b..d729a2987 100644
--- a/xmake/actions/update/main.lua
+++ b/xmake/actions/update/main.lua
@@ -317,7 +317,7 @@ function _initialize_shell()
if os.isfile(target) then
file = io.readfile(target)
file = file:gsub("# >>> xmake >>>.-# <<< xmake <<<", "")
- if file ~= "" then
+ if file ~= "" and not file:endswith("\n") then
file = file .. "\n"
end
end
diff --git a/xmake/modules/private/action/update/fetch_version.lua b/xmake/modules/private/action/update/fetch_version.lua
index af43400ca..18ea762ef 100644
--- a/xmake/modules/private/action/update/fetch_version.lua
+++ b/xmake/modules/private/action/update/fetch_version.lua
@@ -30,6 +30,7 @@ import("net.fasturl")
local official_sources =
{
"https://github.com/xmake-io/xmake.git",
+ "[email protected]:xmake-io/xmake.git",
"https://gitlab.com/tboox/xmake.git",
"https://gitee.com/tboox/xmake.git"
}