Skip to content

Commit

Permalink
bug: fix url parsing for non git urls (oci://, no protocol etc) (argo…
Browse files Browse the repository at this point in the history
…proj#11819)

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: schakrad <chakradari.sindhu@gmail.com>
  • Loading branch information
alexef authored and schakrad committed Mar 14, 2023
1 parent 3d9a159 commit 313cb85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/src/app/shared/components/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ export function repoUrl(url: string): string {
}

export function revisionUrl(url: string, revision: string, forPath: boolean): string {
const parsed = GitUrlParse(url);
try {
const parsed = GitUrlParse(url);
} catch {
// URL Parsing failed
return null;
}
let urlSubPath = isSHA(revision) ? 'commit' : 'tree';

if (url.indexOf('bitbucket') >= 0) {
Expand Down

0 comments on commit 313cb85

Please sign in to comment.