Skip to content

Commit b57eff1

Browse files
committed
fix to not throw
1 parent 15b971e commit b57eff1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/managers/conda/condaUtils.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
import { ENVS_EXTENSION_ID, EXTENSION_ROOT_DIR } from '../../common/constants';
2929
import { showErrorMessageWithLogs } from '../../common/errors/utils';
3030
import { Common, CondaStrings, PackageManagement, Pickers } from '../../common/localize';
31-
import { traceInfo } from '../../common/logging';
31+
import { traceError, traceInfo } from '../../common/logging';
3232
import { getWorkspacePersistentState } from '../../common/persistentState';
3333
import { pickProject } from '../../common/pickers/projects';
3434
import { createDeferred } from '../../common/utils/deferred';
@@ -1085,9 +1085,10 @@ async function getCondaHookPs1Path(condaPath: string): Promise<string> {
10851085
if (found) {
10861086
return found as string;
10871087
}
1088-
throw new Error(
1089-
`Conda hook not found in expected locations. Tried: ${condaRootCandidates.join(
1088+
traceError(
1089+
`Conda hook not found in any of the expected locations: ${condaRootCandidates.join(
10901090
', ',
1091-
)} based on conda executable at ${condaPath}.`,
1091+
)}, given conda path: ${condaPath}`,
10921092
);
1093+
return path.join(condaRoot, 'shell', 'condabin', 'conda-hook.ps1');
10931094
}

0 commit comments

Comments
 (0)