Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/cli/src/config/extensions/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ export function tryParseGithubUrl(source: string): GithubRepoInfo | null {
source = source.replace('[email protected]:', '');
}
// Default to a github repo path, so `source` can be just an org/repo
const parsedUrl = URL.parse(source, 'https://github.com');
let parsedUrl;
try {
// Usamos el constructor estándar compatible con versiones viejas
parsedUrl = new URL(source, 'https://github.com');
} catch (e) {
parsedUrl = null;
}

if (!parsedUrl) {
throw new Error(`Invalid repo URL: ${source}`);
}
Expand Down