Guard against no hosted git info

Closes #6693
This commit is contained in:
Kevin Sawicki
2015-05-07 13:23:14 -07:00
parent 055f05cfe1
commit b7dddeebfe
3 changed files with 9 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ class Package
repoUrl = metadata.repository?.url
if repoUrl
info = hostedGitInfo.fromUrl(repoUrl)
if info.getDefaultRepresentation() is 'shortcut'
if info?.getDefaultRepresentation() is 'shortcut'
metadata.repository.url = info.https().replace(/^git\+/, '')
@loadMetadata: (packagePath, ignoreErrors=false) ->