From ee2189cb2f6c9e2b9c734a839faa20ed2ba8b577 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 30 Jun 2025 12:12:19 -0500 Subject: [PATCH] gh: insert empty helper when using credential helper (#7347) Resets previous helpers so the only one being used is the `gh` cli Signed-off-by: Austin Horstman --- modules/programs/gh.nix | 5 ++++- tests/modules/programs/gh/credential-helper.git.conf | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/programs/gh.nix b/modules/programs/gh.nix index ba08da43..86a8cb0d 100644 --- a/modules/programs/gh.nix +++ b/modules/programs/gh.nix @@ -193,7 +193,10 @@ in map ( host: lib.nameValuePair host { - helper = "${cfg.package}/bin/gh auth git-credential"; + helper = [ + "" + "${cfg.package}/bin/gh auth git-credential" + ]; } ) cfg.gitCredentialHelper.hosts ) diff --git a/tests/modules/programs/gh/credential-helper.git.conf b/tests/modules/programs/gh/credential-helper.git.conf index 29944174..9a9aa564 100644 --- a/tests/modules/programs/gh/credential-helper.git.conf +++ b/tests/modules/programs/gh/credential-helper.git.conf @@ -1,7 +1,9 @@ [credential "https://github.com"] + helper = "" helper = "@gh@/bin/gh auth git-credential" [credential "https://github.example.com"] + helper = "" helper = "@gh@/bin/gh auth git-credential" [gpg]