Skip to content

Suggested run list command for workflows with space in name doesn't work #11119

@richardgroves

Description

@richardgroves

Describe the bug

When a workflow with a space in the name is run with gh workflow run the output suggestion of how to see the runs for the workflow doesn't wrap the name in quotes.

Affected version

gh version 2.74.1 (2025-06-10)
https://github.com/cli/cli/releases/tag/v2.74.1

Steps to reproduce the behavior

  1. Create and register a workflow with a space in the name. eg. 'My Workflow'
  2. Run `gh workflow run "My Workflow"
  3. See error

Expected vs actual behavior

The output of the command to run should either escape the spaces or wrap the name in quotes. Both work.
eg.

gh run list --workflow="My Workflow"
or
gh run list --workflow=My\ Workflow

Logs

N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggh-runrelating to the gh run commandpriority-3Affects a small number of users or is largely cosmetic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions