mirror of
https://github.com/AleziaKurdis/Overte-community-apps.git
synced 2025-04-10 17:02:08 +02:00
Duplication check on installing repositories.
Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
parent
fb96779343
commit
a65f112657
1 changed files with 3 additions and 1 deletions
|
@ -102,8 +102,10 @@
|
|||
getLists();
|
||||
}
|
||||
|
||||
// TODO: Duplication check
|
||||
async function installRepo(url) {
|
||||
var repoIsInstalled = installedRepositories.find((repo) => repo.url === url) ? true : false;
|
||||
if (repoIsInstalled) return; // Repository URL already in the list, don't add it again.
|
||||
|
||||
// Test repository
|
||||
const repo = await request(url);
|
||||
if (!repo) return; // Failure
|
||||
|
|
Loading…
Reference in a new issue