git api: make cwd mandatory

This commit is contained in:
Joao Moreno
2018-08-22 13:06:26 +02:00
parent a49378e26c
commit f9982d29d4
3 changed files with 10 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ export interface ExecResult<T extends string | Buffer> {
}
export interface SpawnOptions extends cp.SpawnOptions {
readonly cwd: string;
readonly input?: string;
readonly encoding?: string;
readonly log?: boolean;
@@ -21,8 +22,8 @@ export interface SpawnOptions extends cp.SpawnOptions {
export interface Git {
readonly path: string;
exec(cwd: string, args: string[], options?: SpawnOptions): Promise<ExecResult<string>>;
spawn(cwd: string, args: string[], options?: SpawnOptions): cp.ChildProcess;
exec(args: string[], options: SpawnOptions): Promise<ExecResult<string>>;
spawn(args: string[], options: SpawnOptions): cp.ChildProcess;
}
export interface API {