From: AJ ONeal Date: Sat, 4 Jul 2020 23:30:45 +0000 (+0000) Subject: check for package existence first X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=6d9f38722b002b0a6df64fdfab051b82da063f7a;p=webi-installers%2F.git check for package existence first --- diff --git a/_webi/packages.js b/_webi/packages.js index 279e940..bdfec06 100644 --- a/_webi/packages.js +++ b/_webi/packages.js @@ -35,6 +35,11 @@ pkgs.create = function (Pkgs, basepath) { }; Pkgs.get = function (node) { + return fs.promises.access(path.join(basepath, node)).then(function () { + return Pkgs._get(node); + }); + }; + Pkgs._get = function (node) { var yash = path.join(basepath, node, 'package.yash'); var curlbash = path.join(basepath, node, 'install.sh'); var readme = path.join(basepath, node, 'README.md');