Skip to content

Commit cfc853c

Browse files
committed
solcjs: Rename 'path' parameters to unshadow the 'path' module
1 parent e5fab6f commit cfc853c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

solcjs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ function abort (msg) {
3434
process.exit(1);
3535
}
3636

37-
function readFileCallback(path) {
38-
path = program.basePath + '/' + path;
39-
if (fs.existsSync(path)) {
37+
function readFileCallback(sourcePath) {
38+
sourcePath = program.basePath + '/' + sourcePath;
39+
if (fs.existsSync(sourcePath)) {
4040
try {
41-
return { 'contents': fs.readFileSync(path).toString('utf8') }
41+
return { 'contents': fs.readFileSync(sourcePath).toString('utf8') }
4242
} catch (e) {
43-
return { error: 'Error reading ' + path + ': ' + e };
43+
return { error: 'Error reading ' + sourcePath + ': ' + e };
4444
}
4545
} else
46-
return { error: 'File not found at ' + path}
46+
return { error: 'File not found at ' + sourcePath}
4747
}
48-
function stripBasePath(path) {
49-
if (program.basePath && path.startsWith(program.basePath))
50-
return path.slice(program.basePath.length);
48+
function stripBasePath(sourcePath) {
49+
if (program.basePath && sourcePath.startsWith(program.basePath))
50+
return sourcePath.slice(program.basePath.length);
5151
else
52-
return path;
52+
return sourcePath;
5353
}
5454

5555
var callbacks = undefined
@@ -167,4 +167,4 @@ originalUncaughtExceptionListeners.forEach(function (listener) {
167167

168168
if (hasError) {
169169
process.exit(1);
170-
}
170+
}

0 commit comments

Comments
 (0)