🐛 git always show stderr

fixes #23632
This commit is contained in:
Joao Moreno 2017-04-25 17:37:27 +02:00
parent e2e8ee077d
commit 24dcf7a27d

View file

@ -330,6 +330,10 @@ export class Git {
const result = await exec(child, options);
if (options.log !== false && result.stderr.length > 0) {
this.log(`${result.stderr}\n`);
}
if (result.exitCode) {
let gitErrorCode: string | undefined = void 0;
@ -349,10 +353,6 @@ export class Git {
gitErrorCode = GitErrorCodes.CantAccessRemote;
}
if (options.log !== false) {
this.log(`${result.stderr}\n`);
}
return Promise.reject<IExecutionResult>(new GitError({
message: 'Failed to execute git',
stdout: result.stdout,