Skip to content

Commit faa2105

Browse files
committed
fix conda hook with new helper function
1 parent 42b3947 commit faa2105

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/managers/conda/condaUtils.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,17 @@ async function getCondaHookPs1Path(condaPath: string): Promise<string> {
11571157
// Create the promise for finding the hook path
11581158
const hookPathPromise = (async () => {
11591159
const condaRoot = path.dirname(path.dirname(condaPath));
1160+
const condaRootCandidates: string[] = [
1161+
path.join(condaRoot, 'shell', 'condabin', 'conda-hook.ps1'),
1162+
path.join(condaRoot, 'Library', 'shell', 'condabin', 'conda-hook.ps1'),
1163+
path.join(condaRoot, 'condabin', 'conda-hook.ps1'),
1164+
path.join(condaRoot, 'etc', 'profile.d', 'conda-hook.ps1'),
1165+
];
1166+
1167+
const condaHookLocation = await findFileInLocations(condaRootCandidates, 'conda-hook.ps1', condaPath);
1168+
if (condaHookLocation) {
1169+
return condaHookLocation;
1170+
}
11601171
return path.join(condaRoot, 'shell', 'condabin', 'conda-hook.ps1');
11611172
})();
11621173

0 commit comments

Comments
 (0)