feat: Data management
This commit is contained in:
@@ -2,6 +2,7 @@ const { spawn } = require('child_process');
|
||||
|
||||
const DEV_SINGLE_INSTANCE_EXIT_CODE = 23;
|
||||
const DEV_SINGLE_INSTANCE_EXIT_CODE_ENV = 'METOYOU_SINGLE_INSTANCE_EXIT_CODE';
|
||||
const DEV_RELOAD_EXISTING_ARG = '--metoyou-dev-reload-existing';
|
||||
|
||||
function isWaylandSession(env) {
|
||||
const sessionType = String(env.XDG_SESSION_TYPE || '').trim().toLowerCase();
|
||||
@@ -36,6 +37,10 @@ function resolveElectronBinary() {
|
||||
function buildElectronArgs(argv) {
|
||||
const args = [...argv];
|
||||
|
||||
if (isDevelopmentLaunch(process.env) && !args.includes(DEV_RELOAD_EXISTING_ARG)) {
|
||||
args.push(DEV_RELOAD_EXISTING_ARG);
|
||||
}
|
||||
|
||||
if (
|
||||
process.platform === 'linux'
|
||||
&& isWaylandSession(process.env)
|
||||
|
||||
Reference in New Issue
Block a user