File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,13 @@ function main() {
116116 }
117117 cmd = findCommand ( args [ 1 ] ) ;
118118 if ( cmd === null ) {
119- return onError ( new Error ( 'invalid argument. Unrecognized/unsupported command. Value: `' + args [ 1 ] + '`.' ) ) ;
119+ return cli . error ( new Error ( 'invalid argument. Unrecognized/unsupported command. Value: `' + args [ 1 ] + '`.' ) ) ;
120120 }
121121 subargs = [ getPath ( cmd . path ) , '--help' ] ;
122122 } else {
123123 cmd = findCommand ( args [ 0 ] ) ;
124124 if ( cmd === null ) {
125- return onError ( new Error ( 'invalid argument. Unrecognized/unsupported command. Value: `' + args [ 0 ] + '`.' ) ) ;
125+ return cli . error ( new Error ( 'invalid argument. Unrecognized/unsupported command. Value: `' + args [ 0 ] + '`.' ) ) ;
126126 }
127127 subargs = [ getPath ( cmd . path ) ] ;
128128 for ( i = 1 ; i < args . length ; i ++ ) {
@@ -161,8 +161,7 @@ function main() {
161161 * @param {Error } error - error object
162162 */
163163 function onError ( error ) {
164- process . exitCode = 1 ;
165- console . error ( 'Error: %s' , error . message ) ; // eslint-disable-line no-console
164+ cli . error ( error ) ;
166165 }
167166}
168167
You can’t perform that action at this time.
0 commit comments