Skip to content

Commit 5abefe3

Browse files
authored
Fix Git URL parsing in get_protocol (#520)
The get_protocol function incorrectly identified URLs containing ".git" anywhere in the string as Git repositories, causing errors when downloading raw files. This commit updates the regex to match ".git$" (end of string). Signed-off-by: Srikanth Aithal <[email protected]>
1 parent d3468e1 commit 5abefe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sbin/makepkg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ get_url() {
274274

275275
# extract the protocol from a source entry - return "local" for local sources
276276
get_protocol() {
277-
if [[ $1 =~ \.git ]]; then
277+
if [[ $1 =~ \.git$ ]]; then
278278
printf "%s\n" "git"
279279
elif [[ $1 = *://* ]]; then
280280
# strip leading filename

0 commit comments

Comments
 (0)