Skip to content

Commit 97c71de

Browse files
committed
Rename Chrome browser directory and environment variables to Chromium
- `apps/editor/src/utils/close-browser.ts` is outdated (we used chrome but are now using chromium)
1 parent 43793d6 commit 97c71de

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎apps/editor/src/utils/close-browser.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ export const close_browser = async () => {
2424
return
2525
}
2626

27-
const chrome_dir_prefix =
28-
path.join(os.homedir(), '.cwc', 'browser', 'chrome') + path.sep
27+
const chromium_dir_prefix =
28+
path.join(os.homedir(), '.cwc', 'browser', 'chromium') + path.sep
2929

3030
try {
3131
if (process.platform === 'win32') {
3232
const script = [
33-
'$target = $env:CWC_CHROME_DIR',
33+
'$target = $env:CWC_CHROMIUM_DIR',
3434
'$procs = Get-CimInstance Win32_Process -Filter "Name = \'chrome.exe\'" | Where-Object {',
3535
' $_.ExecutablePath -and',
3636
' $_.ExecutablePath.StartsWith($target, [System.StringComparison]::OrdinalIgnoreCase) -and',
@@ -53,7 +53,7 @@ export const close_browser = async () => {
5353
{
5454
env: {
5555
...process.env,
56-
CWC_CHROME_DIR: chrome_dir_prefix
56+
CWC_CHROMIUM_DIR: chromium_dir_prefix
5757
},
5858
windowsHide: true
5959
}
@@ -80,7 +80,7 @@ export const close_browser = async () => {
8080
(entry): entry is { pid: number; args: string } =>
8181
entry !== null &&
8282
entry.pid !== process.pid &&
83-
entry.args.startsWith(chrome_dir_prefix) &&
83+
entry.args.startsWith(chromium_dir_prefix) &&
8484
!entry.args.includes('--type=')
8585
)
8686
.map((entry) => entry.pid)

0 commit comments

Comments
 (0)