-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issuehelp wantedContributions welcomeContributions welcomepriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
When running gh repo list ORG against an ORG that does not exist, no error is thrown, exit code is zero.
Steps to reproduce the behavior
$ gh --version
gh version 2.25.1 (2023-03-21)
https://github.com/cli/cli/releases/tag/v2.25.1
run command for existing org, expect success
$ gh repo list cli >/dev/null
$ echo $?
0
run command for non-existent org, expect failure
$ gh repo list doesnotexit >/dev/null
$ echo $?
0
run command when not logged in, returns error message and non-zero exit code
$ gh repo list cli >/dev/null
To get started with GitHub CLI, please run: gh auth login
Alternatively, populate the GH_TOKEN environment variable with a GitHub API authentication token.
$ echo $?
4
Expected vs actual behavior
gh repo list ORG where ORG does not exist should return error message and non-zero exit code
Logs
See steps to reproduce
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issuehelp wantedContributions welcomeContributions welcomepriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic