aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-05-07 20:06:00 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-05-07 20:06:00 +0800
commit8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d (patch)
tree92181ae84efa8da2cd47747cd05d3b8662a76917 /packages
parent9e67e12732a0fc87f0000917e6bbf21c3c2db260 (diff)
downloaddexon-sol-tools-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar
dexon-sol-tools-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.gz
dexon-sol-tools-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.bz2
dexon-sol-tools-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.lz
dexon-sol-tools-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.xz
dexon-sol-tools-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.tar.zst
dexon-sol-tools-8eabc49e9d17925d5cce92cf9e1b3d65ba875f2d.zip
Introduce a var
Diffstat (limited to 'packages')
-rw-r--r--packages/sol-resolver/src/resolvers/name_resolver.ts6
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,