@@ -53,21 +53,22 @@ import {
5353} from '../common/nativePythonFinder' ;
5454import { selectFromCommonPackagesToInstall } from '../common/pickers' ;
5555import { Installable } from '../common/types' ;
56- import { shortVersion , sortEnvironments } from '../common/utils' ;
56+ import { pathForGitBash , shortVersion , sortEnvironments } from '../common/utils' ;
5757
5858export const CONDA_PATH_KEY = `${ ENVS_EXTENSION_ID } :conda:CONDA_PATH` ;
5959export const CONDA_PREFIXES_KEY = `${ ENVS_EXTENSION_ID } :conda:CONDA_PREFIXES` ;
6060export const CONDA_WORKSPACE_KEY = `${ ENVS_EXTENSION_ID } :conda:WORKSPACE_SELECTED` ;
6161export const CONDA_GLOBAL_KEY = `${ ENVS_EXTENSION_ID } :conda:GLOBAL_SELECTED` ;
6262
63+ let condaPath : string | undefined ;
6364export async function clearCondaCache ( ) : Promise < void > {
6465 const state = await getWorkspacePersistentState ( ) ;
6566 await state . clear ( [ CONDA_PATH_KEY , CONDA_WORKSPACE_KEY , CONDA_GLOBAL_KEY ] ) ;
6667 const global = await getGlobalPersistentState ( ) ;
6768 await global . clear ( [ CONDA_PREFIXES_KEY ] ) ;
69+ condaPath = undefined ;
6870}
6971
70- let condaPath : string | undefined ;
7172async function setConda ( conda : string ) : Promise < void > {
7273 condaPath = conda ;
7374 const state = await getWorkspacePersistentState ( ) ;
@@ -283,10 +284,6 @@ function isPrefixOf(roots: string[], e: string): boolean {
283284 return false ;
284285}
285286
286- function pathForGitBash ( binPath : string ) : string {
287- return isWindows ( ) ? binPath . replace ( / \\ / g, '/' ) . replace ( / ^ ( [ a - z A - Z ] ) : / , '/$1' ) : binPath ;
288- }
289-
290287function getNamedCondaPythonInfo (
291288 name : string ,
292289 prefix : string ,
0 commit comments