Merge pull request #324 from samdmarshall/master

updating git command to fetch the url of the remote origin
This commit is contained in:
Dominik Picheta 2017-01-28 12:39:19 +01:00 committed by GitHub
commit 6836b337ef

View file

@ -122,7 +122,7 @@ proc editJson(p: PackageInfo; url, tags, downloadMethod: string) =
proc getPackageOriginUrl(a: Auth): string =
## Adds 'user:pw' to the URL so that the user is not asked *again* for it.
## We need this for 'git push'.
let (output, exitCode) = doCmdEx("git config --get remote.origin.url")
let (output, exitCode) = doCmdEx("git ls-remote --get-url")
result = "origin"
if exitCode == 0:
result = output.string.strip