Skip to content

gh variable list --json numSelectedRepos provides different results depending on TTY or not #9255

@williammartin

Description

@williammartin

Describe the bug

I think this is the same bug as #8679

The TL;DR is that gh variable list does not correctly handle --json numSelectedRepos when in a non-interactive session. This is because we only fetch the selected repos if we're hooked up to TTY which was correct when the command was introduced but not when --json became supported

Steps to reproduce the behavior

  1. Create an organization secret
  2. Set it's visibility to "Selected" and choose a repo
  3. Run gh variable list -o <org> --json numSelectedRepos and see the value = 1
  4. Run gh variable list -o <org> --json numSelectedRepos | cat and see the value = 1

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsgh-variablerelating to the gh variable commandp3Affects 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