Skip to content

Commit f66d5ce

Browse files
committed
Fix source indexing
`actions/checkout@v6` clones repo from URL that doesn't contain `.git` at the end. We were removing last 4 characters of the URL which resulted in wrong `REPO_URL` in source index and debugger was thus unable to fetch sources. The fix is to remove last 4 characters of URL only if there is `.git` at the end.
1 parent c9e791f commit f66d5ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Src/Setup/CreateSourceIndex.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ set SRC_ROOT=%~fdp1
1212

1313
rem get repo url
1414
for /f %%A in ('git remote get-url origin') do set REPO_URL=%%A
15-
rem remove .git from the end
16-
set REPO_URL=%REPO_URL:~0,-4%
15+
rem remove eventual .git from the end
16+
if /I "%REPO_URL:~-4%"==".git" set "REPO_URL=%REPO_URL:~0,-4%"
1717

1818
rem get actual commit id
1919
for /f %%A in ('git rev-parse HEAD') do set COMMIT=%%A

0 commit comments

Comments
 (0)