diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/sol-resolver/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/sol-resolver/CHANGELOG.md | 1 | ||||
-rw-r--r-- | packages/sol-resolver/src/resolvers/relative_fs_resolver.ts | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/packages/sol-resolver/CHANGELOG.json b/packages/sol-resolver/CHANGELOG.json index 114cf2ce6..abce53d09 100644 --- a/packages/sol-resolver/CHANGELOG.json +++ b/packages/sol-resolver/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "1.0.5", + "changes": [ + { + "note": "Fix a bug where RelativeFSResolver would crash when trying to read a directory", + "pr": 909 + } + ] + }, + { "timestamp": 1532619515, "version": "1.0.4", "changes": [ diff --git a/packages/sol-resolver/CHANGELOG.md b/packages/sol-resolver/CHANGELOG.md index 5d2ee154a..8ff6ce6ed 100644 --- a/packages/sol-resolver/CHANGELOG.md +++ b/packages/sol-resolver/CHANGELOG.md @@ -5,6 +5,7 @@ Edit the package's CHANGELOG.json file only. CHANGELOG + ## v1.0.4 - _July 26, 2018_ * Dependencies updated diff --git a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts b/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts index 77103b8c1..ed96040d3 100644 --- a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts +++ b/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts @@ -14,7 +14,7 @@ export class RelativeFSResolver extends Resolver { // tslint:disable-next-line:prefer-function-over-method public resolveIfExists(importPath: string): ContractSource | undefined { const filePath = path.join(this._contractsDir, importPath); - if (fs.existsSync(filePath)) { + if (fs.existsSync(filePath) && !fs.lstatSync(filePath).isDirectory()) { const fileContent = fs.readFileSync(filePath).toString(); return { source: fileContent, |