File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,17 +194,20 @@ export class VenvManager implements EnvironmentManager {
194194 }
195195
196196 // Open the parent folder of the venv in the current window immediately after creation
197- const envParent = path . dirname ( environment . sysPrefix ) ;
197+ const envParent = environment . sysPrefix ;
198198 try {
199- await commands . executeCommand ( 'vscode.openFolder' , Uri . file ( envParent ) , {
200- forceNewWindow : false ,
201- } ) ;
199+ await commands . executeCommand ( 'revealInExplorer' , Uri . file ( envParent ) ) ;
202200 } catch ( error ) {
203201 showErrorMessage (
204- l10n . t ( 'Failed to open venv parent folder: but venv was still created in {0}' , envParent ) ,
202+ l10n . t (
203+ 'Failed to reveal venv parent folder in VS Code Explorer: but venv was still created in {0}' ,
204+ envParent ,
205+ ) ,
205206 ) ;
206207 traceError (
207- `Failed to open venv parent folder: ${ error instanceof Error ? error . message : String ( error ) } ` ,
208+ `Failed to reveal venv parent folder in VS Code Explorer: ${
209+ error instanceof Error ? error . message : String ( error )
210+ } `,
208211 ) ;
209212 }
210213 }
You can’t perform that action at this time.
0 commit comments