From 7ec29fe50aa6f9ac7f00641b3c96c0ab8f516883 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Fri, 11 Oct 2024 20:58:50 -0300 Subject: [PATCH] dotnet: fix leaking gpg-agent in update script --- pkgs/development/compilers/dotnet/update.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/dotnet/update.nix b/pkgs/development/compilers/dotnet/update.nix index cefe8ffd8c30..4fa837a4a274 100644 --- a/pkgs/development/compilers/dotnet/update.nix +++ b/pkgs/development/compilers/dotnet/update.nix @@ -114,9 +114,12 @@ writeScript "update-dotnet-vmr.sh" '' curl -fssL "$sigUrl" -o release.sig - export GNUPGHOME=$PWD/.gnupg - gpg --batch --import ${releaseKey} - gpg --batch --verify release.sig "$tarball" + ( + export GNUPGHOME=$PWD/.gnupg + trap 'gpgconf --kill all' EXIT + gpg --batch --import ${releaseKey} + gpg --batch --verify release.sig "$tarball" + ) tar --strip-components=1 --no-wildcards-match-slash --wildcards -xzf "$tarball" \*/eng/Versions.props \*/global.json artifactsVersion=$(xq -r '.Project.PropertyGroup |