diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-12-19 23:52:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-19 23:52:49 +0800 |
commit | b3978b641c12c7bfe9bab1d561384eeaace25321 (patch) | |
tree | 74f623d9ca80fe8b4a82ea9428655c3fe90711cb /packages/sol-resolver/src/resolvers/relative_fs_resolver.ts | |
parent | 89ea7b2a2d4e3af995ee08988b64a617e7b89aee (diff) | |
parent | d456710441f5d126c63ae31003ddfffb2654047a (diff) | |
download | dexon-sol-tools-b3978b641c12c7bfe9bab1d561384eeaace25321.tar.gz dexon-sol-tools-b3978b641c12c7bfe9bab1d561384eeaace25321.tar.zst dexon-sol-tools-b3978b641c12c7bfe9bab1d561384eeaace25321.zip |
Merge pull request #1461 from 0xProject/feature/sol-compiler-watch
Sol-compiler watch mode
Diffstat (limited to 'packages/sol-resolver/src/resolvers/relative_fs_resolver.ts')
-rw-r--r-- | packages/sol-resolver/src/resolvers/relative_fs_resolver.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts b/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts index ed96040d3..cfff145f9 100644 --- a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts +++ b/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts @@ -13,13 +13,10 @@ 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); + const filePath = path.resolve(path.join(this._contractsDir, importPath)); if (fs.existsSync(filePath) && !fs.lstatSync(filePath).isDirectory()) { const fileContent = fs.readFileSync(filePath).toString(); - return { - source: fileContent, - path: importPath, - }; + return { source: fileContent, path: importPath, absolutePath: filePath }; } return undefined; } |