AppImageUpdate icon indicating copy to clipboard operation
AppImageUpdate copied to clipboard

GithubReleasesUpdateInformation::buildUrl is writing to the console

Open Diyou opened this issue 3 years ago • 2 comments

I'm working on a C# (#203) port of the Updater class which handles different log levels. This part of the code writes directly to the console which it probably should not.

https://github.com/AppImage/AppImageUpdate/blob/2708f91c9ba86eefbc3f13e666cc3356ab9a21a9/src/updateinformation/GithubReleasesZsyncUpdateInformation.h#L42

Diyou avatar Jul 29 '22 01:07 Diyou

Clearly committed by accident. Could you send a PR, please?

TheAssassin avatar Jul 29 '22 01:07 TheAssassin

This actually made me aware of the behaviour that checking for updates will fetch the update information twice which might lead to a temporary timeout from the api (happened to me a few times already): https://github.com/AppImage/AppImageUpdate/blob/2708f91c9ba86eefbc3f13e666cc3356ab9a21a9/src/updater.cpp#L178-L206

 // validate AppImage 
         try { 
             validateAppImage();  // <-- first time
try {
                auto updateInformationPtr = makeUpdateInformation(rawUpdateInformation);
                const auto zsyncUrl = updateInformationPtr->buildUrl(makeIssueStatusMessageCallback()); // <-- second time

Would it be feasible to set zsyncUrl in the constructor ?

Diyou avatar Jul 29 '22 02:07 Diyou