From 3a9c088fcf70e079a623cd3a25edc39ee9beefcb Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sat, 13 Feb 2021 14:35:03 +0200 Subject: [PATCH] Add standard repository file path automatically --- src/plugin/repository/manager.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugin/repository/manager.ts b/src/plugin/repository/manager.ts index 4eae623..2aac0ab 100644 --- a/src/plugin/repository/manager.ts +++ b/src/plugin/repository/manager.ts @@ -135,6 +135,14 @@ export class RepositoryManager { } public async installRepository(url: string): Promise { + // Add standard repository file path, if missing + if (!url.endsWith('/repository.json')) { + if (!url.endsWith('/')) { + url += '/'; + } + url += 'repository.json'; + } + const remote = await this.getRemote(url); const local = path.join(this.env.repositoryPath, remote.name + '.json'); const urlParsed = new URL(url);