Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -22,6 +22,11 @@ export async function resolveRepoDownload(repoEntry, requestedVersion = "latest"
|
||||
}
|
||||
|
||||
const repoInfo = await fetchRepo(normalizedEntry);
|
||||
if (repoInfo.isPrivate) {
|
||||
const error = new Error("Downloads niet beschikbaar voor private repositories.");
|
||||
error.meta = "PRIVATE_REPO";
|
||||
throw error;
|
||||
}
|
||||
const releases = await fetchReleases(normalizedEntry).catch(() => []);
|
||||
|
||||
let targetVersion = requestedVersion || "latest";
|
||||
|
||||
Reference in New Issue
Block a user