diff --git a/extensions/positron-python/src/client/pythonEnvironments/common/environmentManagers/conda.ts b/extensions/positron-python/src/client/pythonEnvironments/common/environmentManagers/conda.ts index bb844f45a0f9..2ec5844f4708 100644 --- a/extensions/positron-python/src/client/pythonEnvironments/common/environmentManagers/conda.ts +++ b/extensions/positron-python/src/client/pythonEnvironments/common/environmentManagers/conda.ts @@ -342,7 +342,7 @@ export class Conda { prefixes.push(home, path.join(localAppData, 'Continuum')); } } else { - prefixes.push('/usr/share', '/usr/local/share', '/opt'); + prefixes.push('/usr/share', '/usr/local/share', '/opt', '/opt/homebrew/bin'); if (home) { prefixes.push(home, path.join(home, 'opt')); } diff --git a/extensions/positron-python/src/test/pythonEnvironments/common/environmentManagers/conda.unit.test.ts b/extensions/positron-python/src/test/pythonEnvironments/common/environmentManagers/conda.unit.test.ts index ec90b9134241..34d28d2b0f93 100644 --- a/extensions/positron-python/src/test/pythonEnvironments/common/environmentManagers/conda.unit.test.ts +++ b/extensions/positron-python/src/test/pythonEnvironments/common/environmentManagers/conda.unit.test.ts @@ -278,7 +278,11 @@ suite('Conda and its environments are located correctly', () => { opt: {}, }, }, - opt: {}, + opt: { + homebrew: { + bin: {}, + }, + }, usr: { share: { doc: {}, @@ -292,7 +296,14 @@ suite('Conda and its environments are located correctly', () => { }; }); - ['/usr/share', '/usr/local/share', '/opt', '/home/user', '/home/user/opt'].forEach((prefix) => { + [ + '/usr/share', + '/usr/local/share', + '/opt', + '/opt/homebrew/bin', + '/home/user', + '/home/user/opt', + ].forEach((prefix) => { const condaPath = `${prefix}/${condaDirName}`; test(`Must find conda in ${condaPath}`, async () => {