diff --git a/src/managers/pipenv/pipenvUtils.ts b/src/managers/pipenv/pipenvUtils.ts index f7045da7..e490c73b 100644 --- a/src/managers/pipenv/pipenvUtils.ts +++ b/src/managers/pipenv/pipenvUtils.ts @@ -47,9 +47,9 @@ export async function clearPipenvCache(): Promise { pipenvPath = undefined; } -function getPipenvPathFromSettings(): Uri[] { +function getPipenvPathFromSettings(): string | undefined { const pipenvPath = getSettingWorkspaceScope('python', 'pipenvPath'); - return pipenvPath ? [Uri.file(pipenvPath)] : []; + return pipenvPath ? pipenvPath : undefined; } export async function getPipenv(native?: NativePythonFinder): Promise { @@ -64,6 +64,14 @@ export async function getPipenv(native?: NativePythonFinder): Promise { traceInfo('Refreshing pipenv environments'); - const searchUris = getPipenvPathFromSettings(); - const data = await nativeFinder.refresh(hardRefresh, searchUris.length > 0 ? searchUris : undefined); + const searchPath = getPipenvPathFromSettings(); + const data = await nativeFinder.refresh(hardRefresh, searchPath ? [Uri.file(searchPath)] : undefined); let pipenv = await getPipenv();