From 6d9f38722b002b0a6df64fdfab051b82da063f7a Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 4 Jul 2020 23:30:45 +0000 Subject: [PATCH] check for package existence first --- _webi/packages.js | 5 +++++ 1 file changed, 5 insertions(+) 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'); -- 2.25.1