Skip to content

Commit

Permalink
fix(git): fix shortcut fallback order again
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 22, 2017
1 parent ff2945b commit 5759d40
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/handlers/git/manifest.js
Expand Up @@ -20,17 +20,20 @@ function manifest (spec, opts) {

function hostedManifest (spec, opts) {
return BB.resolve(null).then(() => {
return plainManifest(spec.hosted.https(), spec, opts)
if (!spec.hosted.git()) {
throw new Error(`No git url for ${spec}`)
}
return plainManifest(spec.hosted.git(), spec, opts)
}).catch(err => {
if (!spec.hosted.sshurl()) {
if (!spec.hosted.https()) {
throw err
}
return plainManifest(spec.hosted.sshurl(), spec, opts)
return plainManifest(spec.hosted.https(), spec, opts)
}).catch(err => {
if (!spec.hosted.git()) {
if (!spec.hosted.sshurl()) {
throw err
}
return plainManifest(spec.hosted.git(), spec, opts)
return plainManifest(spec.hosted.sshurl(), spec, opts)
})
}

Expand Down

0 comments on commit 5759d40

Please sign in to comment.