8 lines
251 B
TypeScript
8 lines
251 B
TypeScript
![]() |
import type { Options } from 'execa';
|
||
|
|
||
|
export async function execCommand(cmd: string, args: string[], options?: Options) {
|
||
|
const { execa } = await import('execa');
|
||
|
const res = await execa(cmd, args, options);
|
||
|
return res?.stdout?.trim() || '';
|
||
|
}
|