node: automatically setup --no-gui
This commit is contained in:
parent
436cc1fd22
commit
c7d0cfd69f
1 changed files with 6 additions and 0 deletions
|
|
@ -4,6 +4,12 @@ var dev = process.argv[1] === '.',
|
|||
var serverStarted
|
||||
|
||||
if (process.title === 'node' || process.title === 'node.exe') {
|
||||
if (!settings.read('noGui')) {
|
||||
settings.cli = true
|
||||
settings.write('noGui', true, true)
|
||||
console.warn('Running with node: headless mode (--no-gui) enabled automatically')
|
||||
}
|
||||
|
||||
process.on('uncaughtException', (err)=>{
|
||||
console.error('A JavaScript error occurred in the main process:')
|
||||
console.trace(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue