File tree 1 file changed +6
-4
lines changed
src/client/interpreter/configuration/interpreterSelector/commands 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import { BaseInterpreterSelectorCommand } from './base';
49
49
import { untildify } from '../../../../common/helpers' ;
50
50
import { useEnvExtension } from '../../../../envExt/api.internal' ;
51
51
import { setInterpreterLegacy } from '../../../../envExt/api.legacy' ;
52
+ import { CreateEnvironmentResult } from '../../../../pythonEnvironments/creation/proposed.createEnvApis' ;
52
53
53
54
export type InterpreterStateArgs = { path ?: string ; workspace : Resource } ;
54
55
export type QuickPickType = IInterpreterQuickPickItem | ISpecialQuickPickItem | QuickPickItem ;
@@ -229,12 +230,13 @@ export class SetInterpreterCommand extends BaseInterpreterSelectorCommand implem
229
230
sendTelemetryEvent ( EventName . SELECT_INTERPRETER_ENTER_OR_FIND ) ;
230
231
return this . _enterOrBrowseInterpreterPath . bind ( this ) ;
231
232
} else if ( selection . label === this . createEnvironmentSuggestion . label ) {
232
- this . commandManager
233
- . executeCommand ( Commands . Create_Environment , {
233
+ const createdEnv = ( await Promise . resolve (
234
+ this . commandManager . executeCommand ( Commands . Create_Environment , {
234
235
showBackButton : false ,
235
236
selectEnvironment : true ,
236
- } )
237
- . then ( noop , noop ) ;
237
+ } ) ,
238
+ ) . catch ( noop ) ) as CreateEnvironmentResult | undefined ;
239
+ state . path = createdEnv ?. path ;
238
240
} else if ( selection . label === this . noPythonInstalled . label ) {
239
241
this . commandManager . executeCommand ( Commands . InstallPython ) . then ( noop , noop ) ;
240
242
this . wasNoPythonInstalledItemClicked = true ;
You can’t perform that action at this time.
0 commit comments