From 4b9be76349b81bfc6c85e929986d0777dcf06f5e Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Tue, 26 Jul 2022 11:54:21 +0200 Subject: [PATCH] getBuildInfo: handle http URLs without a .git suffix --- rollup.utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.utils.js b/rollup.utils.js index b99825ad..82bcf5c4 100644 --- a/rollup.utils.js +++ b/rollup.utils.js @@ -14,7 +14,7 @@ export function getBuildInfo(build) { } let parsed = url.parse(remote); - let newPath = parsed.path.slice(0, parsed.path.lastIndexOf('.')); + let newPath = parsed.path.slice(0, parsed.path.lastIndexOf('.') > -1 ? parsed.path.lastIndexOf('.') : undefined); let newUrl = parsed.protocol + '//' + parsed.host + newPath + '/commit/' + commit; return { -- GitLab