Skip to content

Commit

Permalink
feat: detect python interpreter from pdm
Browse files Browse the repository at this point in the history
  • Loading branch information
fannheyward committed Nov 7, 2023
1 parent d64f625 commit be54a24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/configSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ export class PythonSettings implements IPythonSettings {
}
}

// pdm
p = path.join(this.workspaceRoot, '.pdm-python');
if (fs.existsSync(p)) {
return child_process.spawnSync('pdm', ['info', '--python'], { encoding: 'utf8' }).stdout.trim();
}

// virtualenv in the workspace root
const files = fs.readdirSync(this.workspaceRoot);
for (const file of files) {
Expand Down

0 comments on commit be54a24

Please sign in to comment.