Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
According to the announcement made by the vscode-python extension
microsoft/vscode-python#12596, the new user
setting python.defaultInterpreterPath can be used instead of the
existing python.pythonPath
  • Loading branch information
jaguarfi committed Aug 4, 2020
1 parent 33a0775 commit ab5aa5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/features/utils/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export class Configuration {

public static getPythonPath(resource: Uri = null): string {
// IMPORTANT: python3 does not work, so the default comes from Python extension.
const primary = Configuration.loadSetting('pythonPath', 'python3', resource, true, 'python');
// assume pythonPath is relative to workspace root.
const primary = Configuration.loadSetting('defaultInterpreterPath', 'python3', resource, true, 'python');
// the user setting python.defaultInterpreterPath must be used to invoke the interpreter from the
// VSCode internal storage
if (primary) {
const workspaceRoot = Configuration.GetRootPath(resource);
if (workspaceRoot) {
Expand Down

0 comments on commit ab5aa5e

Please sign in to comment.