Skip to content

Commit

Permalink
installer: detect gpg-agent also when the processes name ends with .exe
Browse files Browse the repository at this point in the history
This fixes git-for-windows/git#4172

Signed-off-by: Jean-Michel Mercier <jeanmichel.mercier@newsbridge.io>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
jeanmichel-nwsb authored and dscho committed Dec 18, 2022
1 parent f2bb9e5 commit c6b8a55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion installer/modules.inc.iss
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ var
AppList:array of RM_PROCESS_INFO;
ReasonList:IdList;
Success:DWORD;
ProcessName:String;
begin
SetArrayLength(Processes,0);
Result:=0;
Expand Down Expand Up @@ -537,7 +538,8 @@ begin
Processes[Have].ID:=AppList[i].Process.dwProcessId;
Processes[Have].Name:=ArrayToString(AppList[i].strAppName);
Processes[Have].Restartable:=AppList[i].bRestartable;
if ('ssh-add'=Processes[Have].Name) or ('ssh-agent'=Processes[Have].Name) or ('ssh-pageant'=Processes[Have].Name) or ('gpg-agent'=Processes[Have].Name) or ('scdaemon'=Processes[Have].Name) then
ProcessName:=ChangeFileExt(Processes[Have].Name, '');
if ('ssh-add'=ProcessName) or ('ssh-agent'=ProcessName) or ('ssh-pageant'=ProcessName) or ('gpg-agent'=ProcessName) or ('scdaemon'=ProcessName) then
Processes[Have].ToTerminate:=True;
end;
Result:=Handle;
Expand Down

0 comments on commit c6b8a55

Please sign in to comment.