diff --git a/src/client/interpreter/helpers.ts b/src/client/interpreter/helpers.ts index f37102e20994..fca5312a8598 100644 --- a/src/client/interpreter/helpers.ts +++ b/src/client/interpreter/helpers.ts @@ -86,7 +86,7 @@ export class InterpreterHelper implements IInterpreterHelper { return 'venv'; } case InterpreterType.VirtualEnv: { - return 'virtualEnv'; + return 'virtualenv'; } default: { return ''; diff --git a/src/client/interpreter/interpreterService.ts b/src/client/interpreter/interpreterService.ts index a4df038d0ea4..a97a07d7c54d 100644 --- a/src/client/interpreter/interpreterService.ts +++ b/src/client/interpreter/interpreterService.ts @@ -172,7 +172,7 @@ export class InterpreterService implements Disposable, IInterpreterService { * @memberof InterpreterService */ public async getDisplayName(info: Partial, resource?: Uri): Promise { - const store = this.persistentStateFactory.createGlobalPersistentState(`${info.path}.interpreter.displayName.v2`, undefined, EXPITY_DURATION); + const store = this.persistentStateFactory.createGlobalPersistentState(`${info.path}.interpreter.displayName.v3`, undefined, EXPITY_DURATION); if (store.value) { return store.value; } @@ -194,7 +194,7 @@ export class InterpreterService implements Disposable, IInterpreterService { info.envName = await virtualEnvMgr.getEnvironmentName(info.path, resource); } if (info.envName && info.envName.length > 0) { - envSuffixParts.push(info.envName); + envSuffixParts.push(`'${info.envName}'`); } if (info.type) { const interpreterHelper = this.serviceContainer.get(IInterpreterHelper); diff --git a/src/test/interpreters/interpreterService.unit.test.ts b/src/test/interpreters/interpreterService.unit.test.ts index f411f73128a4..daadfdc30894 100644 --- a/src/test/interpreters/interpreterService.unit.test.ts +++ b/src/test/interpreters/interpreterService.unit.test.ts @@ -586,7 +586,7 @@ suite('Interpreters service', () => { interpreterInfo.envName = pipEnvName; } if (interpreterInfo.envName && interpreterInfo.envName.length > 0) { - envSuffixParts.push(interpreterInfo.envName); + envSuffixParts.push(`'${interpreterInfo.envName}'`); } if (interpreterInfo.type) { envSuffixParts.push(`${interpreterType!.name}_display`);