Skip to content

Commit

Permalink
Add homebrew path to conda search list (microsoft/vscode-python#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig authored Apr 3, 2024
1 parent 9da1ff2 commit 120f5dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ suite('Conda and its environments are located correctly', () => {
opt: {},
},
},
opt: {},
opt: {
homebrew: {
bin: {},
},
},
usr: {
share: {
doc: {},
Expand All @@ -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 () => {
Expand Down

0 comments on commit 120f5dd

Please sign in to comment.