Fix: git url regex

This commit is contained in:
nyagami
2024-02-06 23:48:26 +07:00
committed by GitHub
parent d1e1404205
commit 80ef523595
+1 -1
View File
@@ -19,7 +19,7 @@ try {
}catch { }catch {
// //
} }
const matched = REMOTE.match(/github\.com[:/](.+?)\/(.+?)\.git/); const matched = REMOTE.match(/([^:/]+?)\/([^/.]+)(\.git)?$/);
if(!matched) throw Error("Cant parse git url"); if(!matched) throw Error("Cant parse git url");
const USERNAME = matched[1]; const USERNAME = matched[1];
const REPO = matched[2]; const REPO = matched[2];