@@ -89,7 +89,7 @@ export async function constructCondaSourcingStatus(condaPath: string): Promise<C
8989 const globalSourcingScript : string | undefined = await findGlobalSourcingScript ( sourcingStatus . condaFolder ) ;
9090 if ( globalSourcingScript ) {
9191 sourcingStatus . globalSourcingScript = globalSourcingScript ;
92- // TODO: determine if we want to exit here or continue to generate all the other activation scripts
92+ // note: future iterations could decide to exit here instead of continuing to generate all the other activation scripts
9393 }
9494
9595 // find and save all of the shell specific sourcing scripts
@@ -111,19 +111,18 @@ export async function findGlobalSourcingScript(condaFolder: string): Promise<str
111111 ? path . join ( condaFolder , 'Scripts' , 'activate.bat' )
112112 : path . join ( condaFolder , 'bin' , 'activate' ) ;
113113
114- traceVerbose ( `Checking for global conda sourcing script at: ${ sourcingScript } ` ) ;
115114 if ( await fse . pathExists ( sourcingScript ) ) {
116115 traceInfo ( `Found global conda sourcing script at: ${ sourcingScript } ` ) ;
117116 return sourcingScript ;
118117 } else {
119- traceInfo ( `No global conda sourcing script found.` ) ;
118+ traceInfo ( `No global conda sourcing script found. at: ${ sourcingScript } ` ) ;
120119 return undefined ;
121120 }
122121}
123122
124123export async function findShellSourcingScripts ( sourcingStatus : CondaSourcingStatus ) : Promise < string [ ] > {
125124 const logs : string [ ] = [ ] ;
126- logs . push ( '=== Conda Shell Script Search ===' ) ;
125+ logs . push ( '=== Conda Sourcing Shell Script Search ===' ) ;
127126
128127 let ps1Script : string | undefined ;
129128 let shScript : string | undefined ;
@@ -134,37 +133,32 @@ export async function findShellSourcingScripts(sourcingStatus: CondaSourcingStat
134133 logs . push ( 'Searching for PowerShell hook script...' ) ;
135134 try {
136135 ps1Script = await getCondaHookPs1Path ( sourcingStatus . condaFolder ) ;
137- logs . push ( ` Status: ${ ps1Script ? '✓ Found' : '✗ Not found' } ` ) ;
138- logs . push ( ` Path: ${ ps1Script ?? 'N/A' } ` ) ;
136+ logs . push ( ` Path: ${ ps1Script ?? '✗ Not found' } ` ) ;
139137 } catch ( err ) {
140138 logs . push (
141- ` ⚠️ Error during PowerShell script search: ${ err instanceof Error ? err . message : 'Unknown error' } ` ,
139+ ` Error during PowerShell script search: ${ err instanceof Error ? err . message : 'Unknown error' } ` ,
142140 ) ;
143141 }
144142
145143 // Search for Shell script (conda.sh)
146144 logs . push ( '\nSearching for Shell script...' ) ;
147145 try {
148146 shScript = await getCondaShPath ( sourcingStatus . condaFolder ) ;
149- logs . push ( ` Status: ${ shScript ? '✓ Found' : '✗ Not found' } ` ) ;
150- logs . push ( ` Path: ${ shScript ?? 'N/A' } ` ) ;
147+ logs . push ( ` Path: ${ shScript ?? '✗ Not found' } ` ) ;
151148 } catch ( err ) {
152- logs . push ( ` ⚠️ Error during Shell script search: ${ err instanceof Error ? err . message : 'Unknown error' } ` ) ;
149+ logs . push ( ` Error during Shell script search: ${ err instanceof Error ? err . message : 'Unknown error' } ` ) ;
153150 }
154151
155152 // Search for Windows CMD script (activate.bat)
156153 logs . push ( '\nSearching for Windows CMD script...' ) ;
157154 try {
158155 cmdActivate = await getCondaBatActivationFile ( sourcingStatus . condaPath ) ;
159- logs . push ( ` Status: ${ cmdActivate ? '✓ Found' : '✗ Not found' } ` ) ;
160- logs . push ( ` Path: ${ cmdActivate ?? 'N/A' } ` ) ;
156+ logs . push ( ` Path: ${ cmdActivate ?? '✗ Not found' } ` ) ;
161157 } catch ( err ) {
162- logs . push ( ` ⚠️ Error during CMD script search: ${ err instanceof Error ? err . message : 'Unknown error' } ` ) ;
158+ logs . push ( ` Error during CMD script search: ${ err instanceof Error ? err . message : 'Unknown error' } ` ) ;
163159 }
164160 } catch ( error ) {
165- logs . push (
166- `\n❌ Critical error during script search: ${ error instanceof Error ? error . message : 'Unknown error' } ` ,
167- ) ;
161+ logs . push ( `\nCritical error during script search: ${ error instanceof Error ? error . message : 'Unknown error' } ` ) ;
168162 } finally {
169163 logs . push ( '\nSearch Summary:' ) ;
170164 logs . push ( ` PowerShell: ${ ps1Script ? '✓' : '✗' } ` ) ;
@@ -189,8 +183,6 @@ export async function findShellSourcingScripts(sourcingStatus: CondaSourcingStat
189183 * - etc/profile.d/
190184 */
191185export async function getCondaHookPs1Path ( condaFolder : string ) : Promise < string | undefined > {
192- // Check cache first
193-
194186 // Create the promise for finding the hook path
195187 const hookPathPromise = ( async ( ) => {
196188 const condaRootCandidates : string [ ] = [
@@ -216,7 +208,6 @@ export async function getCondaHookPs1Path(condaFolder: string): Promise<string |
216208 return undefined ;
217209 } ) ( ) ;
218210
219- // Store in cache and return
220211 return hookPathPromise ;
221212}
222213
@@ -325,11 +316,6 @@ async function getCondaBatActivationFile(condaPath: string): Promise<string | un
325316
326317const knownSourcingScriptCache : string [ ] = [ ] ;
327318export async function getLocalActivationScript ( condaPath : string ) : Promise < string | undefined > {
328- if ( ! condaPath ) {
329- traceVerbose ( 'No conda path provided, cannot find local activation script' ) ;
330- return undefined ;
331- }
332-
333319 // Define all possible paths to check
334320 const paths = [
335321 // Direct path
@@ -351,7 +337,6 @@ export async function getLocalActivationScript(condaPath: string): Promise<strin
351337 traceVerbose ( `Found local activation script in cache at: ${ sourcingScript } ` ) ;
352338 return sourcingScript ;
353339 }
354- traceVerbose ( `Checking for local activation script at: ${ sourcingScript } ` ) ;
355340 try {
356341 const exists = await fse . pathExists ( sourcingScript ) ;
357342 if ( exists ) {
0 commit comments