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`.
This commit is contained in:
Keegan Carruthers-Smith
2017-10-26 11:32:48 +02:00
parent 2948af0522
commit 16089481f0

View File

@@ -251,7 +251,7 @@ export class GitError {
gitCommand: this.gitCommand,
stdout: this.stdout,
stderr: this.stderr
}, [], 2);
}, null, 2);
if (this.error) {
result += (<any>this.error).stack;