Return after rejection.

This commit is contained in:
Daniel Scalzi 2020-09-13 02:22:24 -04:00
parent 2156099ea8
commit 17e36fa5a2
No known key found for this signature in database
GPG Key ID: D18EA3FB4B142A57

View File

@ -551,17 +551,21 @@ exports.pullRemote = function(){
data = DistroIndex.fromJSON(JSON.parse(body))
} catch (e) {
reject(e)
return
}
fs.writeFile(distroDest, body, 'utf-8', (err) => {
if(!err){
resolve(data)
return
} else {
reject(err)
return
}
})
} else {
reject(error)
return
}
})
})
@ -576,8 +580,10 @@ exports.pullLocal = function(){
if(!err){
data = DistroIndex.fromJSON(JSON.parse(d))
resolve(data)
return
} else {
reject(err)
return
}
})
})