Skip to content

Commit fea4d81

Browse files
committed
[lix] fix github short links
1 parent defddb8 commit fea4d81

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/LixTools.hx

+3-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ class LixTools {
9999
addHaxelib(libName, parts[1]);
100100

101101
case "gh" | "github":
102-
addGitLib(lib, "https" + source.substr(protocol.length));
102+
var url = source.substr(protocol.length + 1);
103+
if (!StringTools.startsWith(url, "/")) url = '//github.com/$url';
104+
addGitLib(lib, 'https:$url');
103105

104106
case "http" | "https":
105107
addGitLib(lib, source);

0 commit comments

Comments
 (0)