From 037dffe5465ce0fcda95414b506647e265e9abc5 Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Wed, 9 Oct 2024 14:53:34 +0100 Subject: [PATCH] git-credential-manager: inherit argv0 `git-credential-manager configure` sets up the user's Git configuration to use the tool as a credential helper. In Nix, the tool is wrapped, but the configuration command uses the unwrapped command that doesn't have the PATH set up and therefore fails. Resolve this by including `--inherit-argv0` in the wrapper, so the configuration is set up with the wrapped version of the executable. This will also mean that the specific git-credential-manager version isn't hard-coded into the user's Git configuration files, at least unless the user is calling git-credential-manager that way, and instead the configuration will list whatever was found in the user's PATH, which means user configuration will continue to work after git-credential-manager is updated. Fixes #298080. --- .../version-management/git-credential-manager/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/version-management/git-credential-manager/default.nix b/pkgs/applications/version-management/git-credential-manager/default.nix index 592074224f01..f40d4958a9f8 100644 --- a/pkgs/applications/version-management/git-credential-manager/default.nix +++ b/pkgs/applications/version-management/git-credential-manager/default.nix @@ -41,6 +41,7 @@ buildDotnetModule rec { ++ lib.optional withLibsecretSupport libsecret; makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath ([ git ] ++ lib.optionals withGpgSupport [ gnupg pass ])}" + "--inherit-argv0" ]; passthru = {