416d56b033
This PR - renames the `utils` folder to `tools` (follows internal practice), - migrates the contents of `scripts` into `tools` and removes scripts.
15 lines
305 B
TypeScript
15 lines
305 B
TypeScript
import {spawnSync} from 'child_process';
|
|
|
|
export const spawnAndLog = (...args: string[]): void => {
|
|
const {stdout, stderr} = spawnSync(args[0]!, args.slice(1), {
|
|
encoding: 'utf-8',
|
|
shell: true,
|
|
});
|
|
if (stdout) {
|
|
console.log(stdout);
|
|
}
|
|
if (stderr) {
|
|
console.error(stderr);
|
|
}
|
|
};
|