Files
vercel/utils/exec.js
Ethan Arrowood 3df8c05792 [tests] Add cron job to update gatsby fixtures (#9510)
PR to add a cron job and script that automatically updates gatsby
fixture versions.
2023-02-28 11:32:00 -08:00

17 lines
330 B
JavaScript
Vendored

const { execFileSync } = require('node:child_process');
function exec(cmd, args, opts) {
console.log({ input: `${cmd} ${args.join(' ')}` });
const output = execFileSync(cmd, args, {
encoding: 'utf-8',
...opts,
}).trim();
console.log({ output });
console.log();
return output;
}
module.exports = {
exec,
};