Skip to content

Commit

Permalink
fix(client): final fix load nugets
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Feb 29, 2024
1 parent 5ceb925 commit d11e7c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/src/coreclr/CoreClrValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ std::string CoreClr::GetLatestNugetVersion(alt::IHttpClient* httpClient, const s
if (branch == "release") {
if (it->find("-") == std::string::npos) return *it;
} else {
if (it->find("-" + branch) != std::string::npos) return *it;
if (it->find("-" + branch + ".") != std::string::npos) return *it;
}
}

Expand Down
6 changes: 3 additions & 3 deletions client/src/nuget/NuGet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ std::vector<std::string> NuGet::GetPackageVersions(const std::string& package) {

nlohmann::json NuGet::GetCatalog(std::string package, const std::string& version) {
utils::to_lower(package);
static std::string url = GetIndexUrl("RegistrationsBaseUrl");

static std::string url = GetIndexUrl("RegistrationsBaseUrl/3.6.0");
auto data = utils::download_file_sync(_httpClient, url + package + "/" + version + ".json");
if (data.statusCode != 200) {
throw std::runtime_error("Failed to get package " + package + " registration");
Expand All @@ -48,7 +48,7 @@ nlohmann::json NuGet::GetCatalog(std::string package, const std::string& version

std::string NuGet::DownloadPackage(std::string package, const std::string& version) {
utils::to_lower(package);

static std::string url = GetIndexUrl("PackageBaseAddress/3.0.0");
auto data = utils::download_file_sync(_httpClient, url + package + "/" + version + "/" + package + "." + version + ".nupkg");
if (data.statusCode != 200) {
Expand Down

0 comments on commit d11e7c0

Please sign in to comment.