Add standard repository file path automatically
This commit is contained in:
parent
7bdd922b51
commit
3a9c088fcf
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user