Skip to content

Commit

Permalink
Fixed another bug that affects the debug version of pyright. The way …
Browse files Browse the repository at this point in the history
…I was computing debugTypeshedPath left ".." in the path, so later path comparisons failed.
  • Loading branch information
msfterictraut committed Feb 14, 2020
1 parent ec63949 commit e6396e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/analyzer/pythonPathUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function getTypeShedFallbackPath(fs: VirtualFileSystem) {

// In the debug version of Pyright, the code is one level
// deeper, so we need to look one level up for the typeshed fallback.
const debugTypeshedPath = combinePaths(moduleDirectory, '../' + pathConsts.typeshedFallback);
const debugTypeshedPath = combinePaths(getDirectoryPath(moduleDirectory), pathConsts.typeshedFallback);
if (fs.existsSync(debugTypeshedPath)) {
return debugTypeshedPath;
}
Expand Down

0 comments on commit e6396e3

Please sign in to comment.