(command, args, options = {})
| 43 | } |
| 44 | |
| 45 | function run(command, args, options = {}) { |
| 46 | return new Promise((resolve, reject) => { |
| 47 | execFile(command, args, { maxBuffer: 1024 * 1024 * 256, ...options }, (error, stdout, stderr) => { |
| 48 | if (error) { |
| 49 | error.stderr = stderr?.toString?.() || ""; |
| 50 | error.message = explainMissingTool(error, command); |
| 51 | reject(error); |
| 52 | return; |
| 53 | } |
| 54 | resolve({ stdout, stderr }); |
| 55 | }); |
| 56 | }); |
| 57 | } |
| 58 | |
| 59 | async function ensureDirs() { |
| 60 | await fsp.mkdir(UPLOADS, { recursive: true }); |
no test coverage detected