Merge pull request #972 from gpailler/raise-additional-progression

Raise additional progression events (when download is completed and when update is started)
This commit is contained in:
Paul Betts
2017-05-03 11:00:42 -07:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -39,7 +39,11 @@ namespace Squirrel
try {
this.Log().Info("Downloading file: " + (failedUrl ?? url));
await this.WarnIfThrows(() => wc.DownloadFileTaskAsync(failedUrl ?? url, targetFile),
await this.WarnIfThrows(
async () => {
await wc.DownloadFileTaskAsync(failedUrl ?? url, targetFile);
progress(100);
},
"Failed downloading URL: " + (failedUrl ?? url));
} catch (Exception) {
// NB: Some super brain-dead services are case-sensitive yet

View File

@@ -33,6 +33,7 @@ namespace Squirrel
{
progress = progress ?? (_ => { });
progress(0);
var release = await createFullPackagesFromDeltas(updateInfo.ReleasesToApply, updateInfo.CurrentlyInstalledVersion);
progress(10);