Skip to content
New issue

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

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

Already on GitHub? # to your account

Can’t open links from GitLab if they contain a dash #15

Open
herrherrmann opened this issue Jul 20, 2022 · 3 comments · May be fixed by #19
Open

Can’t open links from GitLab if they contain a dash #15

herrherrmann opened this issue Jul 20, 2022 · 3 comments · May be fixed by #19
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@herrherrmann
Copy link

herrherrmann commented Jul 20, 2022

Heya, thanks for this extension!

I’m trying to open some files on GitLab and it doesn’t fully work. Here’s an example:

If I try to open that file with the extension, I’m getting this error in VS Code:

Path does not exist
The path '~/dev/-/README.md:0:1' does not exist on this computer.

My base path is defined as '/Users/sebastian/dev' (I also tried with a trailing slash: '/Users/sebastian/dev/'). The problem seems to be that the repo name isn’t picked up and a dash is used instead (~/dev/- instead of ~/dev/SwiftWebVC).

@aberonni
Copy link
Owner

Hey! I haven't used Gitlab (or the extension) in a while and it looks like Gitlab has changed their URLs - that dash in the URL didn't use to be there.

You can find the code that builds the URL here:
https://github.com/aberonni/open-in-vscode/blob/master/src/contextmenu.js#L101-L126

Feel free to submit a PR that addresses the change and I'll be happy to take a look at it.

@xiangdongbu
Copy link

xiangdongbu commented Mar 28, 2023

Heya, thanks for this extension!

I’m trying to open some files on GitLab and it doesn’t fully work. Here’s an example:

If I try to open that file with the extension, I’m getting this error in VS Code:

Path does not exist
The path '~/dev/-/README.md:0:1' does not exist on this computer.

My base path is defined as '/Users/sebastian/dev' (I also tried with a trailing slash: '/Users/sebastian/dev/'). The problem seems to be that the repo name isn’t picked up and a dash is used instead (~/dev/- instead of ~/dev/SwiftWebVC).

I have the same problem,(~/dev/- instead of ~/dev/myProject)

@aberonni
Copy link
Owner

Thanks for the extra report. As mentioned above, I might not be able to look at this anytime soon. Feel free to submit a PR if you can figure out what is wrong with the code above.

@salfab salfab linked a pull request Aug 28, 2024 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants