From b154014ee36db5d95f654af54c2812af6a597c58 Mon Sep 17 00:00:00 2001 From: RouxAntoine Date: Sun, 9 Jul 2023 11:52:48 +0200 Subject: [PATCH] fix: resolve bug with path prefix on server url Close Issue 1370 --- dist/index.js | 2 +- src/url-helper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4556295..5dfd493 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2362,7 +2362,7 @@ function getFetchUrl(settings) { return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`; } // "origin" is SCHEME://HOSTNAME[:PORT] - return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`; + return `${serviceUrl.origin}${serviceUrl.pathname}/${encodedOwner}/${encodedName}`; } exports.getFetchUrl = getFetchUrl; function getServerUrl(url) { diff --git a/src/url-helper.ts b/src/url-helper.ts index 6807b7f..04003f1 100644 --- a/src/url-helper.ts +++ b/src/url-helper.ts @@ -16,7 +16,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string { } // "origin" is SCHEME://HOSTNAME[:PORT] - return `${serviceUrl.origin}/${encodedOwner}/${encodedName}` + return `${serviceUrl.origin}${serviceUrl.pathname}/${encodedOwner}/${encodedName}` } export function getServerUrl(url?: string): URL {