File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ class PythonEnvironmentApiImpl implements PythonEnvironmentApi {
318
318
environment ,
319
319
) ;
320
320
await runInTerminal ( environment , terminal , options ) ;
321
- return terminal ;
321
+ return Promise . resolve ( terminal ) ;
322
322
}
323
323
runAsTask ( environment : PythonEnvironment , options : PythonTaskExecutionOptions ) : Promise < TaskExecution > {
324
324
return runAsTask ( environment , options ) ;
Original file line number Diff line number Diff line change @@ -177,7 +177,10 @@ function nativeToPythonEnv(
177
177
178
178
const sv = shortVersion ( info . version ) ;
179
179
const name = info . name || info . displayName || path . basename ( info . prefix ) ;
180
- const displayName = info . displayName || `pyenv (${ sv } )` ;
180
+ let displayName = info . displayName || `pyenv (${ sv } )` ;
181
+ if ( info . kind === NativePythonEnvironmentKind . pyenvVirtualEnv ) {
182
+ displayName = `${ name } (${ sv } )` ;
183
+ }
181
184
182
185
const shellActivation : Map < string , PythonCommandRunConfiguration [ ] > = new Map ( ) ;
183
186
const shellDeactivation : Map < string , PythonCommandRunConfiguration [ ] > = new Map ( ) ;
@@ -232,7 +235,10 @@ export async function refreshPyenv(
232
235
const envs = data
233
236
. filter ( ( e ) => isNativeEnvInfo ( e ) )
234
237
. map ( ( e ) => e as NativeEnvInfo )
235
- . filter ( ( e ) => e . kind === NativePythonEnvironmentKind . pyenv ) ;
238
+ . filter (
239
+ ( e ) =>
240
+ e . kind === NativePythonEnvironmentKind . pyenv || e . kind === NativePythonEnvironmentKind . pyenvVirtualEnv ,
241
+ ) ;
236
242
237
243
const collection : PythonEnvironment [ ] = [ ] ;
238
244
You can’t perform that action at this time.
0 commit comments