File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/client/interpreter/configuration/interpreterSelector/commands Expand file tree Collapse file tree 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';
4949import { untildify } from '../../../../common/helpers' ;
5050import { useEnvExtension } from '../../../../envExt/api.internal' ;
5151import { setInterpreterLegacy } from '../../../../envExt/api.legacy' ;
52+ import { CreateEnvironmentResult } from '../../../../pythonEnvironments/creation/proposed.createEnvApis' ;
5253
5354export type InterpreterStateArgs = { path ?: string ; workspace : Resource } ;
5455export type QuickPickType = IInterpreterQuickPickItem | ISpecialQuickPickItem | QuickPickItem ;
@@ -229,12 +230,13 @@ export class SetInterpreterCommand extends BaseInterpreterSelectorCommand implem
229230 sendTelemetryEvent ( EventName . SELECT_INTERPRETER_ENTER_OR_FIND ) ;
230231 return this . _enterOrBrowseInterpreterPath . bind ( this ) ;
231232 } 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 , {
234235 showBackButton : false ,
235236 selectEnvironment : true ,
236- } )
237- . then ( noop , noop ) ;
237+ } ) ,
238+ ) . catch ( noop ) ) as CreateEnvironmentResult | undefined ;
239+ state . path = createdEnv ?. path ;
238240 } else if ( selection . label === this . noPythonInstalled . label ) {
239241 this . commandManager . executeCommand ( Commands . InstallPython ) . then ( noop , noop ) ;
240242 this . wasNoPythonInstalledItemClicked = true ;
You can’t perform that action at this time.
0 commit comments