Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nexus): fix asset path for nexus repo #2061

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ export class NexusRepositoryManagerApiClient

private async proxiedDownloadUrl(asset: AssetXO) {
const proxyUrl = await this.getBaseUrl();
return `${proxyUrl}/repository/${asset.repository}/${asset.path}`;
// remove leading forward slash for newer versions of Nexus API
const assetPath = asset.path?.replaceAll(/^\//g, '');
return `${proxyUrl}/repository/${asset.repository}/${assetPath}`;
}

private async searchServiceFetcher(url: string, query: SearchServiceQuery) {
Expand Down
97 changes: 94 additions & 3 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.