Merge pull request #383 from waylon531/master

Added better url detection to publish
This commit is contained in:
Dominik Picheta 2017-07-29 12:02:11 +01:00 committed by GitHub
commit d253652afc

View file

@ -206,7 +206,7 @@ proc publish*(p: PackageInfo, o: Options) =
if parsed.scheme == "":
# Assuming that we got an ssh write/read URL.
let sshUrl = parseUri("ssh://" & url)
url = "https://github.com/" & sshUrl.port & sshUrl.path
url = "https://" & sshUrl.hostname & "/" & sshUrl.port & sshUrl.path
elif dirExists(os.getCurrentDir() / ".hg"):
downloadMethod = "hg"
# TODO: Retrieve URL from hg.