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

Commit ec85581

Browse files
committed
Make sure we either run with full path to executable or only with executable filename and nothing else
1 parent 7ea6fa6 commit ec85581

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/GitHub.Api/OutputProcessors/ProcessManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ public T Configure<T>(T processTask, NPath executable = null, string arguments =
4444
gitEnvironment.Configure(startInfo, workingDirectory ?? environment.RepositoryPath);
4545

4646
if (executable.IsRelative)
47+
{
48+
executable = executable.FileName.ToNPath();
4749
executable = FindExecutableInPath(executable, startInfo.EnvironmentVariables["PATH"]) ?? executable;
48-
startInfo.FileName = executable.FileName;
50+
}
51+
startInfo.FileName = executable;
4952
startInfo.Arguments = arguments ?? processTask.ProcessArguments;
5053
processTask.Configure(startInfo);
5154
return processTask;

0 commit comments

Comments
 (0)