From ae7bd54d431cd914b20efab191c6ab357fe24d6a Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Tue, 12 May 2026 12:24:29 +0100 Subject: [PATCH] fix(copilot): provide full path to copilot binary on exec error Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com> --- pkg/cmd/copilot/copilot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/copilot/copilot.go b/pkg/cmd/copilot/copilot.go index d0cd2e8fc..cc83ef48e 100644 --- a/pkg/cmd/copilot/copilot.go +++ b/pkg/cmd/copilot/copilot.go @@ -183,10 +183,10 @@ func runCopilot(opts *CopilotOptions) error { os.Exit(exitErr.ExitCode()) } if foundInPath { - // The binary exists in PATH but exec failed, possibly due to + // We found a `copilot` binary but exec failed, possibly due to // unusual characters in the path (see https://github.com/cli/cli/issues/13106). // Suggest running copilot directly as a workaround. - return fmt.Errorf("%w\nTry running `copilot` directly without `gh`.", err) + return fmt.Errorf("%w\nFailed to run '%s', try running `copilot` directly without `gh`.", err, copilotPath) } return err }