diff --git a/apps/studio/src/common/platform_info.ts b/apps/studio/src/common/platform_info.ts index c69364fa..c406d363 100644 --- a/apps/studio/src/common/platform_info.ts +++ b/apps/studio/src/common/platform_info.ts @@ -46,7 +46,15 @@ if (p.env.PORTABLE_EXECUTABLE_DIR) { const sessionType = p.env.XDG_SESSION_TYPE -const slice = isDevEnv ? 2 : 1 +let slice = 0; + +for (const arg of process.argv) { + slice++; + if (arg.includes('app.asar') === true) { + break; + } +} + const parsedArgs = yargs(p.argv.slice(slice)) // TODO: Automatically enable wayland without flags once // we're confident it will 'just work' for all Wayland users.