From 31f3756089d177c0f2cd58faba6b74ebf960fc12 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Tue, 17 Feb 2026 11:48:22 +0000 Subject: [PATCH] fix(workflow run): bail out on feature detection error Signed-off-by: Babak K. Shandiz --- pkg/cmd/workflow/run/run.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/cmd/workflow/run/run.go b/pkg/cmd/workflow/run/run.go index ee78ed4cf..386227bf1 100644 --- a/pkg/cmd/workflow/run/run.go +++ b/pkg/cmd/workflow/run/run.go @@ -314,10 +314,9 @@ func runRun(opts *RunOptions) error { } } - var returnRunDetailsSupported bool - if features, err := opts.Detector.ActionsFeatures(); err == nil { - // If there's an error detecting features, we assume the feature is not supported. - returnRunDetailsSupported = features.DispatchRunDetails + features, err := opts.Detector.ActionsFeatures() + if err != nil { + return err } path := fmt.Sprintf("repos/%s/%s/actions/workflows/%d/dispatches", url.PathEscape(repo.RepoOwner()), url.PathEscape(repo.RepoName()), workflow.ID) @@ -331,7 +330,7 @@ func runRun(opts *RunOptions) error { // We will have to always set the `return_run_details` field to true, unless // we opt into the the new REST API version, which will probably return the // details by default. - if returnRunDetailsSupported { + if features.DispatchRunDetails { requestBody["return_run_details"] = true }