promisifies require("child_process").exec
and pretty-prints the output of stdout and stderr as data comes in.
npm i @danielberndt/exec;
const result = await exec("ls -l");
exec("ls -l doesntexist").catch(errCode => {
// do something with errCode
});