@@ -171,6 +171,8 @@ export function formatError(e: HookError | any): string {
171
171
if ( e . gitErrorCode ) {
172
172
// known git errors, we should display detailed git error messages.
173
173
return `${ e . message } . Please check git output for more details` ;
174
+ } else if ( e . stderr ) {
175
+ return `${ e . stderr } . Please check git output for more details` ;
174
176
}
175
177
return 'Error' ;
176
178
}
@@ -225,13 +227,13 @@ export async function promiseFromEvent<T, U>(event: Event<T>, adapter: PromiseAd
225
227
let subscription : Disposable ;
226
228
return new Promise < U > (
227
229
( resolve , reject ) =>
228
- ( subscription = event ( ( value : T ) => {
229
- try {
230
- Promise . resolve < U > ( adapter ( value , resolve as any , reject ) ) . catch ( reject ) ;
231
- } catch ( error ) {
232
- reject ( error ) ;
233
- }
234
- } ) ) ,
230
+ ( subscription = event ( ( value : T ) => {
231
+ try {
232
+ Promise . resolve < U > ( adapter ( value , resolve as any , reject ) ) . catch ( reject ) ;
233
+ } catch ( error ) {
234
+ reject ( error ) ;
235
+ }
236
+ } ) ) ,
235
237
) . then (
236
238
( result : U ) => {
237
239
subscription . dispose ( ) ;
@@ -416,7 +418,7 @@ export class ConfigKeysIterator implements IKeyIterator<string> {
416
418
private _from ! : number ;
417
419
private _to ! : number ;
418
420
419
- constructor ( private readonly _caseSensitive : boolean = true ) { }
421
+ constructor ( private readonly _caseSensitive : boolean = true ) { }
420
422
421
423
reset ( key : string ) : this {
422
424
this . _value = key ;
@@ -464,7 +466,7 @@ export class PathIterator implements IKeyIterator<string> {
464
466
private _from ! : number ;
465
467
private _to ! : number ;
466
468
467
- constructor ( private readonly _splitOnBackslash : boolean = true , private readonly _caseSensitive : boolean = true ) { }
469
+ constructor ( private readonly _splitOnBackslash : boolean = true , private readonly _caseSensitive : boolean = true ) { }
468
470
469
471
reset ( key : string ) : this {
470
472
this . _value = key . replace ( / \\ $ | \/ $ / , '' ) ;
@@ -521,7 +523,7 @@ export class UriIterator implements IKeyIterator<Uri> {
521
523
private _states : UriIteratorState [ ] = [ ] ;
522
524
private _stateIdx : number = 0 ;
523
525
524
- constructor ( private readonly _ignorePathCasing : ( uri : Uri ) => boolean ) { }
526
+ constructor ( private readonly _ignorePathCasing : ( uri : Uri ) => boolean ) { }
525
527
526
528
reset ( key : Uri ) : this {
527
529
this . _value = key ;
0 commit comments