mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-25 15:01:49 +00:00
b35d7c9cad
* chore(tools): use async execa * chore: fix lint errors
20 lines
392 B
TypeScript
20 lines
392 B
TypeScript
import type { ExecaReturnValue, Options } from 'execa';
|
|
import { execa } from 'execa';
|
|
|
|
const maxBuffer = 20 * 1024 * 1024;
|
|
|
|
/**
|
|
* Execute a command asynchronously using execa
|
|
*/
|
|
export async function exec(
|
|
cmd: string,
|
|
args: string[] = [],
|
|
opts: Options = {},
|
|
): Promise<ExecaReturnValue> {
|
|
return await execa(cmd, args, {
|
|
...opts,
|
|
maxBuffer,
|
|
encoding: 'utf8',
|
|
});
|
|
}
|