File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -142,17 +142,24 @@ export async function createAnyEnvironmentCommand(
142142 }
143143 } ) ;
144144
145- let managerId = await pickEnvironmentManager (
146- em . managers . filter ( ( m ) => m . supportsCreate ) ,
147- defaultManagers ,
148- ) ;
149- let quickCreate = false ;
150- if ( managerId ?. startsWith ( 'QuickCreate#' ) ) {
151- quickCreate = true ;
152- managerId = managerId . replace ( 'QuickCreate#' , '' ) ;
145+ let quickCreate = options ?. quickCreate ?? false ;
146+ let manager : InternalEnvironmentManager | undefined ;
147+
148+ if ( quickCreate && defaultManagers . length === 1 ) {
149+ manager = defaultManagers [ 0 ] ;
150+ } else {
151+ let managerId = await pickEnvironmentManager (
152+ em . managers . filter ( ( m ) => m . supportsCreate ) ,
153+ defaultManagers ,
154+ ) ;
155+ if ( managerId ?. startsWith ( 'QuickCreate#' ) ) {
156+ quickCreate = true ;
157+ managerId = managerId . replace ( 'QuickCreate#' , '' ) ;
158+ }
159+
160+ manager = em . managers . find ( ( m ) => m . id === managerId ) ;
153161 }
154162
155- const manager = em . managers . find ( ( m ) => m . id === managerId ) ;
156163 if ( manager ) {
157164 const env = await manager . create (
158165 selected . map ( ( p ) => p . uri ) ,
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ export class VenvManager implements EnvironmentManager {
135135 this ,
136136 this . globalEnv ,
137137 venvRoot ,
138+ options ?. additionalPackages ,
138139 ) ;
139140 } else if ( ! this . globalEnv ) {
140141 this . log . error ( 'No base python found' ) ;
You can’t perform that action at this time.
0 commit comments