Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(git.install) Terminate gpg-agent as part of install? #1938

Closed
AdmiringWorm opened this issue Jul 5, 2022 Discussed in #1924 · 2 comments · Fixed by #1945
Closed

(git.install) Terminate gpg-agent as part of install? #1938

AdmiringWorm opened this issue Jul 5, 2022 Discussed in #1924 · 2 comments · Fixed by #1945
Assignees

Comments

@AdmiringWorm
Copy link
Member

Discussed in #1924

Originally posted by brogers5 June 21, 2022
I originally raised this issue in the form of a comment in #1451, but spinning off into a discussion per @TheCakeIsNaOH's request.

TL;DR: the git.install package has had a recurring issue with Git for Windows installations that have enabled signing commits with a GPG key. This spawns a background process (gpg-agent.exe) that must be manually closed by the user in order to upgrade the software. The package contains a chocolateyBeforeModify.ps1 script to handle stopping this process, but this script only runs when git.install is upgraded directly. If indirectly upgraded via the metapackage (i.e git), the script does not run, and consequently the package fails to upgrade.

As a fix for the upstream issue does not appear to be planned for release soon, I'd like to propose we extract the gpg-agent termination code from chocolateyBeforeModify.ps1, encapsulate it within a function defined in helpers.ps1, and call the function from both chocolateyBeforeModify.ps1 (to handle direct upgrades/uninstalls) and chocolateyInstall.ps1 (as a workaround for indirect upgrades) to facilitate a smoother upgrade experience.

Thoughts?

EDIT: I'm also willing to own pull request creation if approved.

@AdmiringWorm
Copy link
Member Author

@brogers5 can you add a comment to this issue, so I can assign the issue to you?

I am unable to assign you without a comment on the issue.

@brogers5
Copy link
Contributor

brogers5 commented Jul 5, 2022

👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants