Skip to content

Commit 557b81e

Browse files
committed
fix #766
1 parent 2e1f76d commit 557b81e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/client/common/configSettings.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
139139
this.venvPath = systemVariables.resolveAny(pythonSettings.get<string>('venvPath'));
140140
this.jediPath = systemVariables.resolveAny(pythonSettings.get<string>('jediPath'));
141141
if (typeof this.jediPath === 'string' && this.jediPath.length > 0) {
142-
this.jediPath = getAbsolutePath(this.jediPath, IS_TEST_EXECUTION ? __dirname : workspaceRoot);
142+
this.jediPath = getAbsolutePath(systemVariables.resolveAny(this.jediPath), IS_TEST_EXECUTION ? __dirname : workspaceRoot);
143143
}
144144
else {
145145
this.jediPath = '';
@@ -184,12 +184,12 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
184184
warning: vscode.DiagnosticSeverity.Warning
185185
}
186186
};
187-
this.linting.pylintPath = getAbsolutePath(this.linting.pylintPath, workspaceRoot);
188-
this.linting.flake8Path = getAbsolutePath(this.linting.flake8Path, workspaceRoot);
189-
this.linting.pep8Path = getAbsolutePath(this.linting.pep8Path, workspaceRoot);
190-
this.linting.pylamaPath = getAbsolutePath(this.linting.pylamaPath, workspaceRoot);
191-
this.linting.prospectorPath = getAbsolutePath(this.linting.prospectorPath, workspaceRoot);
192-
this.linting.pydocstylePath = getAbsolutePath(this.linting.pydocstylePath, workspaceRoot);
187+
this.linting.pylintPath = getAbsolutePath(systemVariables.resolveAny(this.linting.pylintPath), workspaceRoot);
188+
this.linting.flake8Path = getAbsolutePath(systemVariables.resolveAny(this.linting.flake8Path), workspaceRoot);
189+
this.linting.pep8Path = getAbsolutePath(systemVariables.resolveAny(this.linting.pep8Path), workspaceRoot);
190+
this.linting.pylamaPath = getAbsolutePath(systemVariables.resolveAny(this.linting.pylamaPath), workspaceRoot);
191+
this.linting.prospectorPath = getAbsolutePath(systemVariables.resolveAny(this.linting.prospectorPath), workspaceRoot);
192+
this.linting.pydocstylePath = getAbsolutePath(systemVariables.resolveAny(this.linting.pydocstylePath), workspaceRoot);
193193

194194
let formattingSettings = systemVariables.resolveAny(pythonSettings.get<IFormattingSettings>('formatting'));
195195
if (this.formatting) {
@@ -206,8 +206,8 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
206206
yapfArgs: [], yapfPath: 'yapf',
207207
formatOnSave: false
208208
};
209-
this.formatting.autopep8Path = getAbsolutePath(this.formatting.autopep8Path, workspaceRoot);
210-
this.formatting.yapfPath = getAbsolutePath(this.formatting.yapfPath, workspaceRoot);
209+
this.formatting.autopep8Path = getAbsolutePath(systemVariables.resolveAny(this.formatting.autopep8Path), workspaceRoot);
210+
this.formatting.yapfPath = getAbsolutePath(systemVariables.resolveAny(this.formatting.yapfPath), workspaceRoot);
211211

212212
let autoCompleteSettings = systemVariables.resolveAny(pythonSettings.get<IAutoCompeteSettings>('autoComplete'));
213213
if (this.autoComplete) {
@@ -260,8 +260,8 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
260260
pyTestArgs: [], pyTestEnabled: false, pyTestPath: 'pytest',
261261
unittestArgs: [], unittestEnabled: false
262262
};
263-
this.unitTest.pyTestPath = getAbsolutePath(this.unitTest.pyTestPath, workspaceRoot);
264-
this.unitTest.nosetestPath = getAbsolutePath(this.unitTest.nosetestPath, workspaceRoot);
263+
this.unitTest.pyTestPath = getAbsolutePath(systemVariables.resolveAny(this.unitTest.pyTestPath), workspaceRoot);
264+
this.unitTest.nosetestPath = getAbsolutePath(systemVariables.resolveAny(this.unitTest.nosetestPath), workspaceRoot);
265265

266266
// Resolve any variables found in the test arguments
267267
this.unitTest.nosetestArgs = this.unitTest.nosetestArgs.map(arg => systemVariables.resolveAny(arg));

0 commit comments

Comments
 (0)