Make Group and Names compatible with common SSH URL structure
JoshDavid opened this issue · 2 comments
Cloning via SSH usually has a different URL structure than HTTPS. Consider :
- HTTPS:
- SSH:
- git@github.com:the-carlisle-group/Dado.git
- This is the most commonly used format and is currently causing a problem. GitHub will use this format when you try to copy the URL of a repository for cloning
- ssh://git@github.com/the-carlisle-group/Dado.git
- git@github.com:the-carlisle-group/Dado.git
A design decision has to be made to decide whether you want to accommodate the first SSH URL format, or force users to specify the SSH URL as the second format, which works with the existing code.
If you want to accommodate either structure, I would recommend changing the PackageFQP
function (and it looks like the GroupAndName
function as well) from:
g n←¯2↑{⍵⊆⍨'/'≠⍵}⍵.URL
To something like:
g n←¯2↑{⍵⊆⍨~⍵∊':/'}⍵.URL
Otherwise, the folder in the PackageCache directory will try to be created with part of the server address in the name, which has invalid characters.
I haven't thoroughly examined all the code to determine if allowing this new URL structure would cause any problems with existing code. My quick search doesn't show any red flags, but I'll be using this new fix on my end and will report if any problems arise.
Thanks Josh. I see no reason not to make it work for both version. I'll put in your fix.
Done