diff --git a/src/client/pythonEnvironments/common/environmentManagers/pyenv.ts b/src/client/pythonEnvironments/common/environmentManagers/pyenv.ts index ec788f7dd00a..3d6c276cc868 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/pyenv.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/pyenv.ts @@ -21,20 +21,17 @@ export function getPyenvDir(): string { return pyenvDir; } -async function getPyenvBinary(): Promise { +async function getPyenvBinary(): Promise { const pyenvDir = getPyenvDir(); const pyenvBin = path.join(pyenvDir, 'bin', 'pyenv'); if (await pathExists(pyenvBin)) { return pyenvBin; } - return undefined; + return 'pyenv'; } export async function getActivePyenvForDirectory(cwd: string): Promise { const pyenvBin = await getPyenvBinary(); - if (!pyenvBin) { - return undefined; - } try { const pyenvInterpreterPath = await shellExecute(`${pyenvBin} which python`, { cwd }); return pyenvInterpreterPath.stdout.trim();