Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if no remote named origin #3

Open
rnkyr opened this issue Aug 7, 2018 · 4 comments
Open

Error if no remote named origin #3

rnkyr opened this issue Aug 7, 2018 · 4 comments

Comments

@rnkyr
Copy link

rnkyr commented Aug 7, 2018

Hi, @1ec5!
I'm looking forward to start using your script. But, unfortunately, I can't
Every time I'm trying to use it alert pops-up with text:
There is no application set to open the URL /blob/fc06c53be87c67b74b3dfa14e44356280c54700f/ProjectDir/Flows/Feed/Feed.swift#L12.
Probably I need to setup some bindings for such scheme. Could you help me with that?

@1ec5
Copy link
Owner

1ec5 commented Aug 7, 2018

This workflow assumes your clone’s GitHub remote is named origin, since that’s what GitHub recommends by default. Is the remote called something else in your clone? If so, then there would be no base URL to append the blob path to. Since the resulting string starts with a slash, the system thinks the workflow is trying to open an absolute path to a nonexistent local file rather than a URL.

@rnkyr
Copy link
Author

rnkyr commented Aug 7, 2018

yep, that's my case. I got three remotes and no origin.
Ok, thank you for pointing that out

@1ec5 1ec5 changed the title There is no application set to open the URL Error if no remote named origin Aug 7, 2018
@rnkyr
Copy link
Author

rnkyr commented Aug 7, 2018

Ok, I set origin. Now I got a similar message, but with There is no application set to open the URL git@gitlab text. Looks like http here is required, right?

@1ec5
Copy link
Owner

1ec5 commented Aug 7, 2018

I got three remotes and no origin.

OK, in that case, the workflow should probably look for a github.com remote and prompt you to select one if there’s more than one, similar to how it prompts when there are multiple files open in Xcode with the same file name. Let’s track that enhancement in this issue.

There is no application set to open the URL git@gitlab

Currently this workflow only knows how to open files in GitHub when the remote uses an HTTPS URL. Let’s track SSH support in #4 and GitLab.com support in #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants