You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
343 B
TypeScript

import { promisify } from 'node:util'
import { exec } from 'node:child_process'
import { buildUtilsLog } from './'
const promisifyExec = promisify(exec)
export async function buildUtilsExec(file: string) {
const { stdout, stderr } = await promisifyExec(file)
buildUtilsLog(stdout)
if (stderr) {
return false
}
return true
}