X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=_webi%2Fpackages.js;h=bdfec061f18c79432790799549e6a9474935571f;hb=91512157ab426c87e0a82b594620e90e324b23a3;hp=b6ed22123ba4254db5fe97d92c42ac70161d0516;hpb=1ddaa43a7dbfd819edb190152f88a02d6b81c110;p=webi-installers%2F.git diff --git a/_webi/packages.js b/_webi/packages.js index b6ed221..bdfec06 100644 --- a/_webi/packages.js +++ b/_webi/packages.js @@ -35,10 +35,15 @@ 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'); - var winstall = path.join(basepath, node, 'install.bat'); + var winstall = path.join(basepath, node, 'install.ps1'); return Promise.all([ fs.promises .readFile(readme, 'utf-8') @@ -80,7 +85,7 @@ pkgs.create = function (Pkgs, basepath) { // no winstaller winstall = ''; if ('ENOENT' !== e.code && 'ENOTDIR' !== e.code) { - console.error("failed to read '" + node + "/install.bat'"); + console.error("failed to read '" + node + "/install.ps1'"); console.error(e); } })