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

Commit 734697c

Browse files
committed
Make sure we always set the environment properly
1 parent 84d756c commit 734697c

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/GitHub.Api/OutputProcessors/ProcessManager.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,7 @@ public T Configure<T>(T processTask, NPath? executable = null, string arguments
3030
bool dontSetupGit = false)
3131
where T : IProcess
3232
{
33-
if (executable == null)
34-
{
35-
if (processTask.ProcessName?.ToNPath() != null)
36-
{
37-
executable = processTask.ProcessName.ToNPath();
38-
}
39-
else
40-
{
41-
executable = environment.GitExecutablePath;
42-
dontSetupGit = environment.IsCustomGitExecutable;
43-
}
44-
}
33+
executable = executable ?? processTask.ProcessName?.ToNPath() ?? environment.GitExecutablePath;
4534

4635
//If this null check fails, be sure you called Configure() on your task
4736
Guard.ArgumentNotNull(executable, nameof(executable));

0 commit comments

Comments
 (0)