Skip to content

Commit 9554f74

Browse files
committed
Fixes cancellation not working on stream
1 parent ca74af6 commit 9554f74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/env/node/git/git.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,11 @@ export class Git implements Disposable {
411411
const onAbort = () => aborter.abort();
412412

413413
const signal = spawnOpts.signal;
414+
const cancellationDisposable = cancellation.onCancellationRequested(onAbort);
415+
414416
disposable = {
415417
dispose: () => {
416-
cancellation?.onCancellationRequested(onAbort);
418+
cancellationDisposable.dispose();
417419
signal?.removeEventListener('abort', onAbort);
418420
},
419421
};

0 commit comments

Comments
 (0)