mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-25 06:51:11 +00:00
1909c2ef22
* build(deps): update dependency execa to v10 | datasource | package | from | to | | ---------- | ------- | ----- | ------ | | npm | execa | 8.0.1 | 10.0.1 | * fix(exec): adapt to execa v10 types and subprocess API * fix(tools): type execa v10 results in hook exec and mkdocs --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: secustor <sebastian@poxhofer.at>
17 lines
501 B
TypeScript
17 lines
501 B
TypeScript
import type { Result } from 'execa';
|
|
import type { TextOptions } from '../../../utils/exec.ts';
|
|
import { exec as execBase } from '../../../utils/exec.ts';
|
|
|
|
export async function exec<T extends TextOptions = Record<never, never>>(
|
|
cmd: string,
|
|
args: string[] = [],
|
|
opts?: T,
|
|
): Promise<Result<T & { encoding: 'utf8' }>> {
|
|
return await execBase(cmd, args, {
|
|
stdout: process.stderr,
|
|
stderr: process.stderr,
|
|
env: { ...process.env, RENOVATE_AGENT_HOOK: '1' },
|
|
...opts,
|
|
} as T);
|
|
}
|