Files
booster/scripts/utils/run.ts
Kyle Fang 2c3b11fb99 chore: disable github action
Will implement with new version of github later on
2019-09-22 15:28:33 +08:00

19 lines
377 B
TypeScript

import { exec } from "child_process";
export const run = (command: string) =>
new Promise((ful, rej) => {
const { stdout } = exec(command, (error, _, stderr) => {
if (stderr) {
console.log(stderr);
}
if (error) {
rej(error);
} else {
ful();
}
});
if (stdout) {
stdout.pipe(process.stdout);
}
});