-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingp3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
If a target repo does not exist, eg: gh browse -R cli/cli brings up a 404 in the browser, but gh browse -n -R cli/cli returns a destination URL that does not exist and exit status 0.
Steps to reproduce the behavior
$ gh browse -n -R cli/cli
https://github.com/cli/cli
$ echo $?
0
$ gh browse -n -R cli/cli-doesnotexist
https://github.com/cli/cli-doesnotexist
$ echo $?
0
Expected vs actual behavior
Expect to test if the constructed destination URL exist before displaying to the user, or at least provide a warning that it's not reachable.
gh browse -n -R ORG/REPO where ORG/REPO does not exist should return error message and non-zero exit code
Maybe 2 error codes - one if ORG reachable but REPO is not, one for ORG/REPO not reachable?
Logs
See steps to reproduce
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingp3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic