Skip to content

Commit afa84be

Browse files
committed
Convert a repository url from SSH to HTTPS.
1 parent d42f85c commit afa84be

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Packages.res

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,19 @@ let parsePkgs = data => {
501501
->Resource.filterKeywords
502502
->Resource.uniqueKeywords
503503

504+
// Convert a repository url from SSH to HTTPS.
505+
let repositoryHref = switch repositoryHref {
506+
| href if String.startsWith(href, "git+ssh") => {
507+
String.replace(href, "git+ssh:", "https:") }
508+
| href if String.startsWith(href, "git+") => {
509+
String.replace(href, "git+", "")
510+
}
511+
| href if String.startsWith(href, "git:") => {
512+
String.replace(href, "git:", "https:")
513+
}
514+
| href => href
515+
}
516+
504517
Some({
505518
name,
506519
version,

0 commit comments

Comments
 (0)