@@ -14,7 +14,7 @@ import { IApplicationShell } from '../application/types';
14
14
import { wrapCancellationTokens } from '../cancellation' ;
15
15
import { IFileSystem } from '../platform/types' ;
16
16
import * as internalPython from '../process/internal/python' ;
17
- import { IProcessServiceFactory } from '../process/types' ;
17
+ import { IProcessServiceFactory , SpawnOptions } from '../process/types' ;
18
18
import { ITerminalServiceFactory , TerminalCreationOptions } from '../terminal/types' ;
19
19
import { ExecutionInfo , IConfigurationService , ILogOutputChannel , Product } from '../types' ;
20
20
import { isResource } from '../utils/misc' ;
@@ -31,7 +31,7 @@ export abstract class ModuleInstaller implements IModuleInstaller {
31
31
32
32
public abstract get type ( ) : ModuleInstallerType ;
33
33
34
- constructor ( protected serviceContainer : IServiceContainer ) { }
34
+ constructor ( protected serviceContainer : IServiceContainer ) { }
35
35
36
36
public async installModule (
37
37
productOrModuleName : Product | string ,
@@ -230,7 +230,12 @@ export abstract class ModuleInstaller implements IModuleInstaller {
230
230
) ;
231
231
await processService . shellExec ( quoted ) ;
232
232
} else {
233
- await processService . exec ( command , args ) ;
233
+ // --- Start Positron ---
234
+ // Pass the cancellation token through so that users can cancel installs via the UI
235
+ // when executeInTerminal is false
236
+ const spawnOptions : SpawnOptions = { token } ;
237
+ await processService . exec ( command , args , spawnOptions ) ;
238
+ // --- End Positron ---
234
239
}
235
240
}
236
241
}
0 commit comments