Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing global virtual env watcher tests #14633

Merged
merged 1 commit into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function watchLocationForPythonBinaries(
const disposables = new DisposableRegistry();
for (const pattern of patterns) {
disposables.push(watchLocationForPattern(baseDir, pattern, (type: FileChangeType, e: string) => {
const isMatch = minimatch(e, path.join('**', executableBaseGlob), { nocase: getOSType() === OSType.Windows });
const isMatch = minimatch(path.basename(e), executableBaseGlob, { nocase: getOSType() === OSType.Windows });
if (!isMatch) {
// When deleting the file for some reason path to all directories leading up to python are reported
// Skip those events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ suite('GlobalVirtualEnvironment Locator', async () => {
setup(async () => {
process.env.WORKON_HOME = testWorkOnHomePath;
locator = new GlobalVirtualEnvironmentLocator();
await locator.initialize();
// Wait for watchers to get ready
await sleep(1000);
});
Expand Down