Don't quit on window-all-closed when in repl mode
This commit is contained in:
		
					parent
					
						
							
								832ac97088
							
						
					
				
			
			
				commit
				
					
						09710d6c47
					
				
			
		
					 1 changed files with 6 additions and 6 deletions
				
			
		|  | @ -9,12 +9,6 @@ const path = require('path'); | ||||||
| const repl = require('repl'); | const repl = require('repl'); | ||||||
| const url = require('url'); | const url = require('url'); | ||||||
| 
 | 
 | ||||||
| // Quit when all windows are closed and no other one is listening to this.
 |  | ||||||
| app.on('window-all-closed', function() { |  | ||||||
|   if (app.listeners('window-all-closed').length == 1) |  | ||||||
|     app.quit(); |  | ||||||
| }); |  | ||||||
| 
 |  | ||||||
| // Parse command line options.
 | // Parse command line options.
 | ||||||
| var argv = process.argv.slice(1); | var argv = process.argv.slice(1); | ||||||
| var option = { file: null, help: null, version: null, webdriver: null, modules: [] }; | var option = { file: null, help: null, version: null, webdriver: null, modules: [] }; | ||||||
|  | @ -43,6 +37,12 @@ for (var i = 0; i < argv.length; i++) { | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | // Quit when all windows are closed and no other one is listening to this.
 | ||||||
|  | app.on('window-all-closed', function() { | ||||||
|  |   if (app.listeners('window-all-closed').length == 1 && !option.interactive) | ||||||
|  |     app.quit(); | ||||||
|  | }); | ||||||
|  | 
 | ||||||
| // Create default menu.
 | // Create default menu.
 | ||||||
| app.once('ready', function() { | app.once('ready', function() { | ||||||
|   if (Menu.getApplicationMenu()) |   if (Menu.getApplicationMenu()) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kevin Sawicki
				Kevin Sawicki