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
- Create an organization secret
- Set it's visibility to "Selected" and choose a repo
- Run
gh variable list -o <org> --json numSelectedRepos and see the value = 1
- Run
gh variable list -o <org> --json numSelectedRepos | cat and see the value = 1
Describe the bug
I think this is the same bug as #8679
The TL;DR is that
gh variable listdoes not correctly handle--json numSelectedReposwhen 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--jsonbecame supportedSteps to reproduce the behavior
gh variable list -o <org> --json numSelectedReposand see the value = 1gh variable list -o <org> --json numSelectedRepos | catand see the value = 1