Duplication check on installing repositories.

Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
Armored Dragon 2024-07-19 12:24:32 -05:00
parent fb96779343
commit a65f112657
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B

View file

@ -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