Commit 037dffe5 authored by Adam Dinwoodie's avatar Adam Dinwoodie
Browse files

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.
parent e4a2b789
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ buildDotnetModule rec {
    ++ lib.optional withLibsecretSupport libsecret;
  makeWrapperArgs = [
    "--prefix PATH : ${lib.makeBinPath ([ git ] ++ lib.optionals withGpgSupport [ gnupg pass ])}"
    "--inherit-argv0"
  ];

  passthru = {