mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-13 11:28:56 +02:00
[cmake, frontend] Fix update checker and move to self-hosted Git (#3558)
httplib doesn't like when you include the protocol, as it would seem Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3558 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
45c9f9bbb3
commit
f4e7fc91ba
5 changed files with 15 additions and 9 deletions
|
|
@ -82,8 +82,8 @@ std::optional<std::string> UpdateChecker::GetResponse(std::string url, std::stri
|
|||
|
||||
std::optional<UpdateChecker::Update> UpdateChecker::GetLatestRelease(bool include_prereleases) {
|
||||
const auto update_check_url = std::string{Common::g_build_auto_update_api};
|
||||
std::string update_check_path = fmt::format("/repos/{}",
|
||||
std::string{Common::g_build_auto_update_repo});
|
||||
auto update_check_path = fmt::format("{}{}", std::string{Common::g_build_auto_update_api_path},
|
||||
std::string{Common::g_build_auto_update_repo});
|
||||
try {
|
||||
if (include_prereleases) { // This can return either a prerelease or a stable release,
|
||||
// whichever is more recent.
|
||||
|
|
@ -124,14 +124,14 @@ std::optional<UpdateChecker::Update> UpdateChecker::GetLatestRelease(bool includ
|
|||
return Update{latest_tag, latest_name};
|
||||
}
|
||||
|
||||
} catch (nlohmann::detail::out_of_range &) {
|
||||
} catch (nlohmann::detail::out_of_range&) {
|
||||
LOG_ERROR(Frontend,
|
||||
"Parsing JSON response from {}{} failed during update check: "
|
||||
"nlohmann::detail::out_of_range",
|
||||
update_check_url,
|
||||
update_check_path);
|
||||
return {};
|
||||
} catch (nlohmann::detail::type_error &) {
|
||||
} catch (nlohmann::detail::type_error&) {
|
||||
LOG_ERROR(Frontend,
|
||||
"Parsing JSON response from {}{} failed during update check: "
|
||||
"nlohmann::detail::type_error",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue