chore(style): add shebang, set bash strict mode, create function
[webi-installers/.git] / _webi / packages.js
index 279e94056eb4f605b65062c923d18324c2cb080c..bdfec061f18c79432790799549e6a9474935571f 100644 (file)
@@ -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');