Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit a82ee33

Browse files
committed
Get a better fix that doesn't break the current assumptions of how finally handlers are called
1 parent f3652d7 commit a82ee33

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/GitHub.Api/Application/ApplicationManagerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ public void Run(bool firstRun)
107107
Logger.Trace("Using portable git");
108108

109109
var setupGit = new GitInstaller(Environment, ProcessManager, TaskManager).SetupGitIfNeeded();
110+
t.Then(setupGit);
110111
setupGit.Finally((s, state) =>
111112
{
112113
endTask.PreviousResult = state;
113114
endTask.Start();
114115
});
115116
setupGit.Progress(progressReporter.UpdateProgress);
116117
// append installer task to top chain
117-
t.Then(setupGit);
118118
};
119119

120120
var setupChain = setExistingEnvironmentPath.Then(setupOctorun);

src/GitHub.Api/Tasks/TaskBase.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,7 @@ protected virtual void RaiseOnEnd(TResult data)
671671
protected override void CallFinallyHandler()
672672
{
673673
finallyHandler?.Invoke(!taskFailed, result);
674-
if (finallyHandler == null)
675-
base.CallFinallyHandler();
674+
base.CallFinallyHandler();
676675
}
677676

678677
public new Task<TResult> Task

0 commit comments

Comments
 (0)