1 |
|
2 | import { PortablePath } from '@yarnpkg/fslib';
|
3 | import { Readable, Writable } from 'stream';
|
4 | export declare enum EndStrategy {
|
5 | Never = 0,
|
6 | ErrorCode = 1,
|
7 | Always = 2
|
8 | }
|
9 | export declare type PipevpOptions = {
|
10 | cwd: PortablePath;
|
11 | env?: {
|
12 | [key: string]: string | undefined;
|
13 | };
|
14 | end?: EndStrategy;
|
15 | strict?: boolean;
|
16 | stdin: Readable | null;
|
17 | stdout: Writable;
|
18 | stderr: Writable;
|
19 | };
|
20 | export declare function pipevp(fileName: string, args: Array<string>, { cwd, env, strict, stdin, stdout, stderr, end }: PipevpOptions): Promise<{
|
21 | code: number;
|
22 | }>;
|
23 | export declare type ExecvpOptions = {
|
24 | cwd: PortablePath;
|
25 | env?: {
|
26 | [key: string]: string | undefined;
|
27 | };
|
28 | encoding?: string;
|
29 | strict?: boolean;
|
30 | };
|
31 | export declare function execvp(fileName: string, args: Array<string>, opts: ExecvpOptions & {
|
32 | encoding: 'buffer';
|
33 | }): Promise<{
|
34 | code: number;
|
35 | stdout: Buffer;
|
36 | stderr: Buffer;
|
37 | }>;
|
38 | export declare function execvp(fileName: string, args: Array<string>, opts: ExecvpOptions & {
|
39 | encoding: string;
|
40 | }): Promise<{
|
41 | code: number;
|
42 | stdout: string;
|
43 | stderr: string;
|
44 | }>;
|
45 | export declare function execvp(fileName: string, args: Array<string>, opts: ExecvpOptions): Promise<{
|
46 | code: number;
|
47 | stdout: string;
|
48 | stderr: string;
|
49 | }>;
|