Add standard repository file path automatically

This commit is contained in:
Evert Prants 2021-02-13 14:35:03 +02:00
parent 7bdd922b51
commit 3a9c088fcf
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -135,6 +135,14 @@ export class RepositoryManager {
}
public async installRepository(url: string): Promise<IRepository> {
// 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);