Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dev Container Using MCR #21675

Merged
merged 5 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
get correct CI_PYTHON_PATH tested
  • Loading branch information
anthonykim1 committed Jul 24, 2023
commit 9ec93808e07c4853a6bfb5005ed6760bbfba6121
2 changes: 1 addition & 1 deletion src/client/common/interpreterPathService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const isRemoteGlobalSettingCopiedKey = 'isRemoteGlobalSettingCopiedKey';
export const defaultInterpreterPathSetting: keyof IPythonSettings = 'defaultInterpreterPath';
const CI_PYTHON_PATH = getCIPythonPath();

function getCIPythonPath(): string {
export function getCIPythonPath(): string {
if (process.env.CI_PYTHON_PATH && fs.existsSync(process.env.CI_PYTHON_PATH)) {
return process.env.CI_PYTHON_PATH;
}
Expand Down
9 changes: 7 additions & 2 deletions src/test/common/interpreterPathService.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ import {
WorkspaceConfiguration,
} from 'vscode';
import { IApplicationEnvironment, IWorkspaceService } from '../../client/common/application/types';
import { defaultInterpreterPathSetting, InterpreterPathService } from '../../client/common/interpreterPathService';
import {
defaultInterpreterPathSetting,
getCIPythonPath,
InterpreterPathService,
} from '../../client/common/interpreterPathService';
import { FileSystemPaths } from '../../client/common/platform/fs-paths';
import { InterpreterConfigurationScope, IPersistentState, IPersistentStateFactory } from '../../client/common/types';
import { createDeferred, sleep } from '../../client/common/utils/async';
Expand Down Expand Up @@ -447,7 +451,8 @@ suite('Interpreter Path Service', async () => {
workspaceValue: undefined,
});
const settingValue = interpreterPathService.get(resource);
expect(settingValue).to.equal('python');

expect(settingValue).to.equal(getCIPythonPath());
});

test('If defaultInterpreterPathSetting is changed, an event is fired', async () => {
Expand Down
Loading