Skip to content

Commit 24dcf7a

Browse files
committed
🐛 git always show stderr
fixes microsoft#23632
1 parent e2e8ee0 commit 24dcf7a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

extensions/git/src/git.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ export class Git {
330330

331331
const result = await exec(child, options);
332332

333+
if (options.log !== false && result.stderr.length > 0) {
334+
this.log(`${result.stderr}\n`);
335+
}
336+
333337
if (result.exitCode) {
334338
let gitErrorCode: string | undefined = void 0;
335339

@@ -349,10 +353,6 @@ export class Git {
349353
gitErrorCode = GitErrorCodes.CantAccessRemote;
350354
}
351355

352-
if (options.log !== false) {
353-
this.log(`${result.stderr}\n`);
354-
}
355-
356356
return Promise.reject<IExecutionResult>(new GitError({
357357
message: 'Failed to execute git',
358358
stdout: result.stdout,

0 commit comments

Comments
 (0)