chore: do not show the open error (#23547)

This commit is contained in:
Pavel Feldman 2023-06-06 11:09:08 -07:00 committed by GitHub
parent 5e0195f7c4
commit 6351630af2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -184,8 +184,7 @@ async function openTraceInBrowser(traceUrls: string[], options?: Options) {
const { url } = await startTraceViewerServer(traceUrls, options);
// eslint-disable-next-line no-console
console.log('\nListening on ' + url);
// eslint-disable-next-line no-console
await open(url, { wait: true }).catch(() => console.log(`Failed to open browser on ${url}`));
await open(url, { wait: true }).catch(() => {});
}
class StdinServer {

View file

@ -164,7 +164,7 @@ export async function showHTMLReport(reportFolder: string | undefined, host: str
console.log(colors.cyan(` Serving HTML report at ${url}. Press Ctrl+C to quit.`));
if (testId)
url += `#?testId=${testId}`;
await open(url, { wait: true }).catch(() => console.log(`Failed to open browser on ${url}`));
await open(url, { wait: true }).catch(() => {});
await new Promise(() => {});
}