From b38ce2449752a41c4a653671bb10f6938cabcca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 24 Sep 2021 14:43:48 +0200 Subject: [PATCH] Ensure correct path to `gh` after `gh auth refresh` git credential setup --- pkg/cmd/auth/refresh/refresh.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/auth/refresh/refresh.go b/pkg/cmd/auth/refresh/refresh.go index 4ece13384..6244fabf5 100644 --- a/pkg/cmd/auth/refresh/refresh.go +++ b/pkg/cmd/auth/refresh/refresh.go @@ -129,7 +129,9 @@ func refreshRun(opts *RefreshOptions) error { var additionalScopes []string - credentialFlow := &shared.GitCredentialFlow{} + credentialFlow := &shared.GitCredentialFlow{ + Executable: opts.MainExecutable, + } gitProtocol, _ := cfg.Get(hostname, "git_protocol") if opts.Interactive && gitProtocol == "https" { if err := credentialFlow.Prompt(hostname); err != nil {