mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-07 13:22:26 +02:00
fix(core): fix docusaurus start
error for macOS users with no Chromium-based browser (#11205)
This commit is contained in:
parent
76518fd206
commit
68aa3c876b
1 changed files with 8 additions and 1 deletions
|
@ -70,7 +70,14 @@ async function tryOpenWithAppleScript({
|
||||||
const command = `ps cax -o command | grep -E "^(${supportedChromiumBrowsers.join(
|
const command = `ps cax -o command | grep -E "^(${supportedChromiumBrowsers.join(
|
||||||
'|',
|
'|',
|
||||||
)})$"`;
|
)})$"`;
|
||||||
const result = await execPromise(command);
|
|
||||||
|
const result = await execPromise(command).catch(() => {
|
||||||
|
// Ignore grep errors when macOS user has no Chromium-based browser
|
||||||
|
// See https://github.com/facebook/docusaurus/issues/11204
|
||||||
|
});
|
||||||
|
if (!result) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const activeBrowsers = result.stdout.toString().trim().split('\n');
|
const activeBrowsers = result.stdout.toString().trim().split('\n');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue