优化 hidden 启动参数的行为
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user