cli: prevent loading gui settings when running with node

This commit is contained in:
bordun 2020-05-10 09:42:12 +02:00
parent 345bba95e0
commit 0b57f030bb
2 changed files with 3 additions and 1 deletions

View file

@ -24,7 +24,6 @@ function nodeMode() {
console.warn('(INFO) Running with node')
if (!settings.read('no-gui')) {
settings.cli = true
settings.write('no-gui', true, true)
console.warn('(INFO) Headless mode (--no-gui) enabled automatically')
}

View file

@ -68,6 +68,9 @@ var cli = false
for (let i in argv) {
if (!cliOnly.includes(i)) cli = true
}
if (process.title === 'node' || process.title === 'node.exe') {
cli = true
}
var settings = {