Rename browser variable

This commit is contained in:
Oliver Blanthorn 2021-03-05 19:22:07 +00:00 committed by GitHub
parent bb0e567d77
commit ac4c0232a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -476,14 +476,14 @@ export async function ff_cmdline(): Promise<string[]> {
let output: MessageResp let output: MessageResp
if ((await browserBg.runtime.getPlatformInfo()).os === "win") { if ((await browserBg.runtime.getPlatformInfo()).os === "win") {
if (!(await nativegate("0.3.3", false))) { if (!(await nativegate("0.3.3", false))) {
const browser = await config.get("browser") const browser_name = await config.get("browser")
output = await run( output = await run(
`powershell -NoProfile -Command "\ `powershell -NoProfile -Command "\
$processes = Get-CimInstance -Property ProcessId,ParentProcessId,Name,CommandLine -ClassName Win32_Process;\ $processes = Get-CimInstance -Property ProcessId,ParentProcessId,Name,CommandLine -ClassName Win32_Process;\
if (-not ($processes | where { $_.Name -match '^${browser}' })) { exit 1; };\ if (-not ($processes | where { $_.Name -match '^${browser_name}' })) { exit 1; };\
$ppid = ($processes | where { $_.ProcessId -EQ $PID }).ParentProcessId;\ $ppid = ($processes | where { $_.ProcessId -EQ $PID }).ParentProcessId;\
$pproc = $processes | where { $_.ProcessId -EQ $ppid };\ $pproc = $processes | where { $_.ProcessId -EQ $ppid };\
while ($pproc.Name -notmatch '^${browser}') {\ while ($pproc.Name -notmatch '^${browser_name}') {\
$ppid = $pproc.ParentProcessId;\ $ppid = $pproc.ParentProcessId;\
$pproc = $processes | where { $_.ProcessId -EQ $ppid };\ $pproc = $processes | where { $_.ProcessId -EQ $ppid };\
};\ };\