Galerie und tage

This commit is contained in:
2021-11-23 17:56:26 +01:00
parent ff35366279
commit 5f873bee89
4693 changed files with 149659 additions and 301447 deletions

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

@@ -1,31 +1,29 @@
'use strict';
const execa = require('execa');
const executable = require('executable');
var spawn = require('child_process').spawn;
var executable = require('executable');
module.exports = (bin, args) => {
if (!Array.isArray(args)) {
args = ['--help'];
module.exports = function (bin, cmd, cb) {
if (typeof cmd === 'function') {
cb = cmd;
cmd = ['--help'];
}
return executable(bin)
.then(works => {
if (!works) {
throw new Error(`Couldn't execute the \`${bin}\` binary. Make sure it has the right permissions.`);
}
executable(bin, function (err, works) {
if (err) {
cb(err);
return;
}
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;
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);
});
});
};