@@ -51,7 +51,6 @@ if(argv['--'].length){ // temporarily override ganache args
5151
5252const shell = new InteractiveSolidityShell ( config ) ;
5353
54-
5554process . on ( 'exit' , ( ) => {
5655 shell . blockchain . stopService ( ) ;
5756 if ( argv [ '--' ] . length ) { //restore old ganache args
@@ -61,13 +60,17 @@ process.on('exit', () => {
6160 saveFile ( SESSION , shell . dumpSession ( ) )
6261} ) ;
6362
64-
65-
6663const vorpal = new Vorpal ( )
6764 . delimiter ( '' )
6865 . show ( )
6966 . parse ( argv . _ ) ;
7067
68+ vorpal . on ( 'client_prompt_submit' , ( cmd ) => {
69+ if ( cmd . trim ( ) === 'exit' ) {
70+ process . exit ( 0 ) ; // exit completely from repl. otherwise, would return to main vorpal loop
71+ }
72+ } ) ;
73+
7174vorpal
7275 . mode ( 'repl' , 'Enters Solidity Shell Mode' )
7376 . delimiter ( c . bold ( '» ' ) )
@@ -122,7 +125,7 @@ cheers 🙌
122125` ) ;
123126
124127 break ; //show usage
125- case '.exit' : process . exit ( ) ; //exit -> no more cb()
128+ case '.exit' : process . exit ( ) ; break ; //exit -> no more cb()
126129 case '.reset' : shell . reset ( ) ; break ; //reset complete state
127130 case '.undo' : shell . revert ( ) ; break ; //revert last action
128131 case '.config' :
@@ -225,4 +228,5 @@ vorpal
225228
226229/** start in repl mode */
227230vorpal . execSync ( "repl" )
231+
228232//vorpal.execSync("uint a = 2") /* debug */
0 commit comments