From a05d64d7f0a0e7aa3cce6ff2706b5cb89992cce9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 29 Jun 2017 11:05:25 +0200 Subject: [PATCH] fixes #29448 --- extensions/git/src/git.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 0ced42c7eac..9129f527fe6 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -155,6 +155,12 @@ export interface IExecutionResult { } async function exec(child: cp.ChildProcess, options: any = {}): Promise { + if (!child.stdout || !child.stderr) { + throw new GitError({ + message: 'Failed to get stdout or stderr from git process.' + }); + } + const disposables: IDisposable[] = []; const once = (ee: NodeJS.EventEmitter, name: string, fn: Function) => {