File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ var files = argv._;
47
47
var destination = argv [ 'output-dir' ] || '.'
48
48
49
49
function abort ( msg ) {
50
- console . log ( msg || 'Error occured' ) ;
50
+ console . error ( msg || 'Error occured' ) ;
51
51
process . exit ( 1 ) ;
52
52
}
53
53
@@ -90,7 +90,7 @@ if (!output) {
90
90
abort ( 'No output from compiler' ) ;
91
91
} else if ( output [ 'errors' ] ) {
92
92
for ( var error in output [ 'errors' ] ) {
93
- console . log ( output [ 'errors' ] [ error ] ) ;
93
+ console . error ( output [ 'errors' ] [ error ] ) ;
94
94
}
95
95
}
96
96
@@ -100,7 +100,7 @@ function writeFile (file, content) {
100
100
file = path . join ( destination , file ) ;
101
101
fs . writeFile ( file , content , function ( err ) {
102
102
if ( err ) {
103
- console . log ( 'Failed to write ' + file + ': ' + err ) ;
103
+ console . error ( 'Failed to write ' + file + ': ' + err ) ;
104
104
}
105
105
} ) ;
106
106
}
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ tape('CLI', function (t) {
6
6
t . test ( '--version' , function ( st ) {
7
7
var spt = spawn ( st , './solcjs --version' ) ;
8
8
spt . stdout . match ( RegExp ( pkg . version + '(-[^a-zA-A0-9.+]+)?(\\+[^a-zA-Z0-9.-]+)?' ) ) ;
9
+ spt . stderr . empty ( ) ;
9
10
spt . end ( ) ;
10
11
} ) ;
11
12
@@ -17,7 +18,7 @@ tape('CLI', function (t) {
17
18
18
19
t . test ( 'no mode specified' , function ( st ) {
19
20
var spt = spawn ( st , './solcjs test/DAO/Token.sol' ) ;
20
- spt . stdout . match ( / ^ I n v a l i d o p t i o n s e l e c t e d / ) ;
21
+ spt . stderr . match ( / ^ I n v a l i d o p t i o n s e l e c t e d / ) ;
21
22
spt . end ( ) ;
22
23
} ) ;
23
24
@@ -30,7 +31,7 @@ tape('CLI', function (t) {
30
31
31
32
t . test ( 'invalid file specified' , function ( st ) {
32
33
var spt = spawn ( st , './solcjs --bin test/fileNotFound.sol' ) ;
33
- spt . stdout . match ( / ^ E r r o r r e a d i n g / ) ;
34
+ spt . stderr . match ( / ^ E r r o r r e a d i n g / ) ;
34
35
spt . end ( ) ;
35
36
} ) ;
36
37
You can’t perform that action at this time.
0 commit comments