File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ function abort (msg) {
36
36
}
37
37
38
38
function readFileCallback ( sourcePath ) {
39
- sourcePath = program . basePath + '/' + sourcePath ;
39
+ if ( program . basePath )
40
+ sourcePath = program . basePath + '/' + sourcePath ;
40
41
if ( fs . existsSync ( sourcePath ) ) {
41
42
try {
42
43
return { 'contents' : fs . readFileSync ( sourcePath ) . toString ( 'utf8' ) }
@@ -75,7 +76,7 @@ function stripBasePath(sourcePath) {
75
76
}
76
77
77
78
var callbacks = undefined
78
- if ( program . basePath )
79
+ if ( program . basePath || ! program . standardJson )
79
80
callbacks = { 'import' : readFileCallback } ;
80
81
81
82
if ( program . standardJson ) {
Original file line number Diff line number Diff line change @@ -69,9 +69,7 @@ tape('CLI', function (t) {
69
69
'./solcjs --bin ' +
70
70
'test/resources/importA.sol ' +
71
71
'./test/resources//importA.sol ' +
72
- path . resolve ( 'test/resources/importA.sol' ) + ' ' +
73
- // Adding importB explicitly here should make compiler find it despite the lack of callback
74
- 'test/resources/importB.sol '
72
+ path . resolve ( 'test/resources/importA.sol' )
75
73
) ;
76
74
spt . stderr . empty ( ) ;
77
75
spt . succeeds ( ) ;
You can’t perform that action at this time.
0 commit comments