server: yargs update breaking things again

This commit is contained in:
bordun 2022-05-30 15:40:11 +02:00
parent 5228444b59
commit 976c2c2040
2 changed files with 3 additions and 1 deletions

View file

@ -94,7 +94,7 @@ function startServerProcess() {
var {fork} = require('child_process')
serverProcess = fork(app.getAppPath(), args, {stdio: 'pipe', env: process.env})
serverProcess = fork(app.getAppPath(), args, {stdio: 'pipe', env: {...process.env, OSC_SERVER_PROCESS: 1}})
if (!settings.read('no-gui')) {
var cb = (data)=>{

View file

@ -8,6 +8,8 @@ var path = require('path'),
// This prevents argv parsing to be breaked when the app is packaged (executed without 'electron' prefix)
var firstArgIndex = path.basename(process.argv[0]).match(/electron|node/) ? 2 : 1
if (process.env.OSC_SERVER_PROCESS) firstArgIndex++
// on windows, electron stops parsing after the first argument containing a colon
// https://github.com/electron/electron/pull/13039
// windows cli users need to add a double dash (--) before their options to avoid that