From: AJ ONeal Date: Sat, 26 Sep 2020 20:35:31 +0000 (+0000) Subject: clarify error message X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=9e9cf83d681380a564f081b6297f89efa110767e;p=webi-installers%2F.git clarify error message --- diff --git a/_webi/releases.js b/_webi/releases.js index 83eeb14..f5ef319 100644 --- a/_webi/releases.js +++ b/_webi/releases.js @@ -7,7 +7,12 @@ var _normalize = require('../_webi/normalize.js'); var Releases = module.exports; Releases.get = async function (pkgdir) { - var get = require(path.join(pkgdir, 'releases.js')); + var get; + try { + get = require(path.join(pkgdir, 'releases.js')); + } catch (e) { + throw new Error('no releases.js for', pkgdir.split(/[\/\\]+/).pop()); + } return get(request).then(function (all) { return _normalize(all); });