优化 hidden 启动参数的行为

This commit is contained in:
lyswhut
2025-08-06 12:21:47 +08:00
parent 49c8081f68
commit 1803517943
2 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -9,11 +9,11 @@ import { nativeTheme, powerSaveBlocker } from 'electron'
import { joinPath } from '@common/utils/nodejs'
import themes from '@common/theme/index.json'
export const parseEnvParams = (): { cmdParams: LX.CmdParams, deeplink: string | null } => {
export const parseEnvParams = (argv = process.argv): { cmdParams: LX.CmdParams, deeplink: string | null } => {
const cmdParams: LX.CmdParams = {}
let deeplink = null
const rx = /^-\w+/
for (let param of process.argv) {
for (let param of argv) {
if (URL_SCHEME_RXP.test(param)) {
deeplink = param
}