qwik-account-manager/libs/execawait.js

13 lines
317 B
JavaScript
Raw Normal View History

2022-01-15 19:27:18 +01:00
import { exec } from 'child_process'
export default function execawait(cmd) {
return new Promise((resolve, reject) => {
exec(cmd, (error, stdout, stderr) => {
if (error) {
console.warn(error);
}
resolve(stdout ? stdout : stderr);
});
});
}