`gitihub open [url]` should display a helpful error message
See original GitHub issueIs your feature request related to a problem? Please describe.
There was a discussion in #4259 about the friction of github open
displaying a dialog to confirm adding a repository, and it was agreed that this was unnecessary. #4513 has been merged, but there was an unresolved question about how we handle URLs.
Describe the solution you’d like
I’d like github open [url]
to be a bit more paranoid about “things that looks like remote URLs” and defensively indicate what needs to be done.
Something like this:
$ github open https://github.com/desktop/desktop
You cannot open a remote URL in GitHub Desktop
Use `git clone https://github.com/desktop/desktop` instead to initiate the clone
And the github
CLI should return an error code here.
Describe alternatives you’ve considered
The current behaviour is to consider the URL to be a relative path, and open the dialog to that “path”, which doesn’t make much sense.
I’m also 👎 on implicitly redirecting this to github clone [url]
- this might also be confusing.
Teachability, Documentation, Adoption, Migration Strategy
Not sure if there’s anything else to cover off here 🤷♂️
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top GitHub Comments
@msztech apologies for the delay in replying.
We have existing logic for this that could be used here, rather than hand-rolling any new checks:
https://github.com/desktop/desktop/blob/0ed30be2cece05603ff4f10d9b7c4be241299a7d/app/src/lib/remote-parsing.ts#L47-L62
This was resolved in #7452 and published as part of Desktop 2.0. Thanks again @msztech!