File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -34,22 +34,22 @@ function abort (msg) {
34
34
process . exit ( 1 ) ;
35
35
}
36
36
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 ) ) {
40
40
try {
41
- return { 'contents' : fs . readFileSync ( path ) . toString ( 'utf8' ) }
41
+ return { 'contents' : fs . readFileSync ( sourcePath ) . toString ( 'utf8' ) }
42
42
} catch ( e ) {
43
- return { error : 'Error reading ' + path + ': ' + e } ;
43
+ return { error : 'Error reading ' + sourcePath + ': ' + e } ;
44
44
}
45
45
} else
46
- return { error : 'File not found at ' + path }
46
+ return { error : 'File not found at ' + sourcePath }
47
47
}
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 ) ;
51
51
else
52
- return path ;
52
+ return sourcePath ;
53
53
}
54
54
55
55
var callbacks = undefined
@@ -167,4 +167,4 @@ originalUncaughtExceptionListeners.forEach(function (listener) {
167
167
168
168
if ( hasError ) {
169
169
process . exit ( 1 ) ;
170
- }
170
+ }
You can’t perform that action at this time.
0 commit comments