File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ import { runInBackground } from './execution/runInBackground';
4949import { EnvVarManager } from './execution/envVariableManager' ;
5050import { checkUri } from '../common/utils/pathUtils' ;
5151import { waitForAllEnvManagers , waitForEnvManager , waitForEnvManagerId } from './common/managerReady' ;
52+ import { timeout } from '../common/utils/asyncUtils' ;
53+ import { isWindows } from '../common/utils/platformUtils' ;
5254
5355class PythonEnvironmentApiImpl implements PythonEnvironmentApi {
5456 private readonly _onDidChangeEnvironments = new EventEmitter < DidChangeEnvironmentsEventArgs > ( ) ;
@@ -304,6 +306,12 @@ class PythonEnvironmentApiImpl implements PythonEnvironmentApi {
304306 options . cwd instanceof Uri ? options . cwd : Uri . file ( options . cwd ) ,
305307 environment ,
306308 ) ;
309+ if ( isWindows ( ) ) {
310+ // Since we have extra polliing on Windows that could lead to race stale promptInputModel value,
311+ // temporarily add small timeout to avoid ^C.
312+ // TODO: Consider removing when we clean up polling with newer conpty: https://github.com/microsoft/vscode/issues/224488
313+ await timeout ( 50 ) ;
314+ }
307315 await runInTerminal ( environment , terminal , options ) ;
308316 return terminal ;
309317 }
You can’t perform that action at this time.
0 commit comments