Closed liamnichols closed 4 years ago
Fantastic, thanks for the PR @liamnichols! Looks good to me. Could you add a changelog entry as well and then we can get this merged
Thanks @yonaskolb, I've updated the changelog for a 0.14.0 release with a description of this fix.. Hope that's alright 👍
I'm trying to integrate the R.swift project into my Mintfile (https://github.com/mac-cain13/R.swift/issues/593) and I've done so using the shorthand syntax like this:
However upon trying to install via
mint bootstrap
I get the following:After digging through the source, it looks like there is some logic in the
gitPath
computed property to detect when the user specifies a custom non-github.com hostname without a url scheme (i.emycustomdomain.com/package
) and this was done by checking for a.
in any part of the string.I'm not sure if this is the right approach since it seems a bit fragile, but I was able to work around the issue by checking that the first component of the repo string separated by
/
contains the period instead of the entire string. I've added an example and the tests verify that it hasn't caused any known regressions.I feel like there might be a nicer way to resolve this bug however I didn't want to spend too much time on it since I don't know exactly what are the valid formats. I raised this PR as a starting point but am happy to make further changes with some help 🙂
Additionally, I also noticed that in the console log the name would also be printed incorrectly:
My second commit patches this by doing
.replacingOccurrences(of: ".git", with: "")
instead ofcomponents(separatedBy: ".").first!
. I don't think there are any other intended path components so this should be ok?Thanks for all the great work on this! Let me know if I can do anything else to help with this issue 🙏