From 61c851cc56066d10c96ac057cee45a2ee8c2f160 Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Fri, 30 Aug 2024 13:23:16 +0100 Subject: [PATCH] Added python exe option to initialize command Signed-off-by: paulober <44974737+paulober@users.noreply.github.com> --- src/activator.mts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/activator.mts b/src/activator.mts index 015b40d..8aa651c 100644 --- a/src/activator.mts +++ b/src/activator.mts @@ -322,7 +322,13 @@ export default class Activator { // [Command] Initialise disposable = vscode.commands.registerCommand( commandPrefix + "initialise", - async () => { + async (pythonExecutable?: string) => { + // set python executable + if (pythonExecutable !== undefined && pythonExecutable.length > 0) { + await pythonApi.environments.updateActiveEnvironmentPath( + pythonExecutable + ); + } await this.stubs?.addToWorkspace(); } );