From 16089481f094cfb9d64c81f794aafabfd31b7425 Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Thu, 26 Oct 2017 11:32:48 +0200 Subject: [PATCH] git: Include GitErrorData in GitError.toString We are passing `GitErrorData` to `JSON.stringify` to include in the string generated by `GitError.toString`. However, we set `replacer` to `[]`, which means `JSON.stringify` will _always_ serialize to `{ }`. After this change GitError messages should be more understandable, and not just say `Failed to execute git`. --- extensions/git/src/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index d0f69123a04e9..6449275769eec 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -251,7 +251,7 @@ export class GitError { gitCommand: this.gitCommand, stdout: this.stdout, stderr: this.stderr - }, [], 2); + }, null, 2); if (this.error) { result += (this.error).stack;