Skip to content

Commit 8cb7e5a

Browse files
committed
Avoids verbose logging for cancellation
1 parent e36e558 commit 8cb7e5a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/env/node/git/git.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,11 +1612,15 @@ export class Git {
16121612

16131613
if (ex != null) {
16141614
Logger.error(
1615-
'',
1616-
`${getLoggableScopeBlockOverride('GIT')} ${command} ${GlyphChars.Dot} ${(ex.message || String(ex) || '')
1617-
.trim()
1618-
.replace(/fatal: /g, '')
1619-
.replace(/\r?\n|\r/g, ` ${GlyphChars.Dot} `)} [${duration}ms]${status}`,
1615+
undefined,
1616+
`${getLoggableScopeBlockOverride('GIT')} ${command} ${GlyphChars.Dot} ${
1617+
isCancellationError(ex)
1618+
? 'cancelled'
1619+
: (ex.message || String(ex) || '')
1620+
.trim()
1621+
.replace(/fatal: /g, '')
1622+
.replace(/\r?\n|\r/g, ` ${GlyphChars.Dot} `)
1623+
} [${duration}ms]${status}`,
16201624
);
16211625
} else if (slow) {
16221626
Logger.warn(

0 commit comments

Comments
 (0)