Skip to content

Commit

Permalink
Added python exe option to initialize command
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <44974737+paulober@users.noreply.github.com>
  • Loading branch information
paulober committed Aug 30, 2024
1 parent 49e54ef commit 61c851c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/activator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
);
Expand Down

0 comments on commit 61c851c

Please sign in to comment.