Improved argument forwarding

This commit is contained in:
Florian Rappl
2026-06-06 21:10:19 +02:00
parent d9f3da87a8
commit 58b9ad0125
2 changed files with 9 additions and 2 deletions

View File

@@ -1,4 +1,10 @@
## 0.5.0
# 0.5.1
## ElectronNET.Core
- Fixed slicing of arguments for packaged applications (#1072)
# 0.5.0
## ElectronNET.Core

View File

@@ -133,7 +133,8 @@ if (manifestJsonFile.singleInstance) {
// Collect user supplied command line args (excluding those handled by Electron host itself)
function getForwardedArgs() {
const skipSwitches = new Set(['unpackedelectron', 'unpackeddotnet', 'dotnetpacked']);
return process.argv.slice(2).filter(arg => {
const sliceIndex = app.isPackaged ? 1 : 2;
return process.argv.slice(sliceIndex).filter(arg => {
if (!arg) return false;
// Node/Electron internal or we already process them
if (arg.startsWith('--manifest')) return false;