diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-07 20:06:00 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-07 20:06:00 +0800 |
commit | 8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d (patch) | |
tree | 92181ae84efa8da2cd47747cd05d3b8662a76917 /packages/sol-resolver/src/resolvers | |
parent | 9e67e12732a0fc87f0000917e6bbf21c3c2db260 (diff) | |
download | dexon-0x-contracts-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar dexon-0x-contracts-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.gz dexon-0x-contracts-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.bz2 dexon-0x-contracts-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.lz dexon-0x-contracts-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.xz dexon-0x-contracts-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.zst dexon-0x-contracts-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.zip |
Introduce a var
Diffstat (limited to 'packages/sol-resolver/src/resolvers')
-rw-r--r-- | packages/sol-resolver/src/resolvers/name_resolver.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/sol-resolver/src/resolvers/name_resolver.ts b/packages/sol-resolver/src/resolvers/name_resolver.ts index a0bedab98..76bed802e 100644 --- a/packages/sol-resolver/src/resolvers/name_resolver.ts +++ b/packages/sol-resolver/src/resolvers/name_resolver.ts @@ -18,7 +18,8 @@ export class NameResolver extends EnumerableResolver { const onFile = (filePath: string) => { const contractName = path.basename(filePath, SOLIDITY_FILE_EXTENSION); if (contractName === lookupContractName) { - const source = fs.readFileSync(path.join(this._contractsDir, filePath)).toString(); + const absoluteContractPath = path.join(this._contractsDir, filePath); + const source = fs.readFileSync(absoluteContractPath).toString(); contractSource = { source, path: filePath, @@ -35,7 +36,8 @@ export class NameResolver extends EnumerableResolver { const contractSources: ContractSource[] = []; const onFile = (filePath: string) => { const contractName = path.basename(filePath, SOLIDITY_FILE_EXTENSION); - const source = fs.readFileSync(path.join(this._contractsDir, filePath)).toString(); + const absoluteContractPath = path.join(this._contractsDir, filePath); + const source = fs.readFileSync(absoluteContractPath).toString(); const contractSource = { source, path: filePath, |