Skip to content

Commit 793ecd8

Browse files
committed
Update git.ado
Safeguard against repo URL ending in ".git"
1 parent 6468ab5 commit 793ecd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git.ado

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ syntax anything(name=gitArgs id="git command and arguments")
5757
if("`gitCommand'" == "install"){
5858

5959
/* Get the name of the repo - Stata has no equivalent to JS (or others) of string split */
60-
local repoName = "`gitParam1'"
60+
local repoName = subinstr("`gitParam1'",".git","",.)
6161
local separatorPos = strpos("`repoName'","/")
6262
while `separatorPos' > 0 {
6363
local repoName = trim(substr("`repoName'", `separatorPos'+1, length("`repoName'")-`separatorPos'))

0 commit comments

Comments
 (0)