schnee effeckt und fehler Korektur

This commit is contained in:
2023-08-14 17:52:24 +02:00
parent 4a843d4936
commit 79af4e9907
6813 changed files with 343821 additions and 356128 deletions

48
node_modules/bin-check/index.js generated vendored
View File

@@ -1,29 +1,31 @@
'use strict';
var spawn = require('child_process').spawn;
var executable = require('executable');
const execa = require('execa');
const executable = require('executable');
module.exports = function (bin, cmd, cb) {
if (typeof cmd === 'function') {
cb = cmd;
cmd = ['--help'];
module.exports = (bin, args) => {
if (!Array.isArray(args)) {
args = ['--help'];
}
executable(bin, function (err, works) {
if (err) {
cb(err);
return;
}
return executable(bin)
.then(works => {
if (!works) {
throw new Error(`Couldn't execute the \`${bin}\` binary. Make sure it has the right permissions.`);
}
if (!works) {
cb(new Error('Couldn\'t execute the `' + bin + '` binary. Make sure it has the right permissions.'));
return;
}
var cp = spawn(bin, cmd);
cp.on('error', cb);
cp.on('exit', function (code) {
cb(null, code === 0);
});
});
return execa(bin, args);
})
.then(res => res.code === 0);
};
module.exports.sync = (bin, args) => {
if (!Array.isArray(args)) {
args = ['--help'];
}
if (!executable.sync(bin)) {
throw new Error(`Couldn't execute the \`${bin}\` binary. Make sure it has the right permissions.`);
}
return execa.sync(bin, args).status === 0;
};