Skip to content

Commit 95f13e9

Browse files
committed
fix reveal for venv creation
1 parent 80161e2 commit 95f13e9

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/managers/builtin/venvManager.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)