mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-01 10:09:50 +00:00
15 lines
361 B
TypeScript
15 lines
361 B
TypeScript
// istanbul ignore file
|
|
import { promisify } from 'util';
|
|
import { exec as cpExec, ExecOptions } from 'child_process';
|
|
|
|
const pExec = promisify(cpExec);
|
|
|
|
export interface ExecResult {
|
|
stdout: string;
|
|
stderr: string;
|
|
}
|
|
|
|
export function exec(cmd: string, options?: ExecOptions): Promise<ExecResult> {
|
|
return pExec(cmd, { ...options, encoding: 'utf-8' });
|
|
}
|