fix(trace-viewer): exit if given trace.zip does not exist

This commit is contained in:
Max Schmitt 2024-04-03 15:31:01 +02:00
parent 0734d1e733
commit d7e08bf7ba

View file

@ -146,7 +146,7 @@ export async function installRootRedirect(server: HttpServer, traceUrls: string[
}
export async function runTraceViewerApp(traceUrls: string[], browserName: string, options: TraceViewerServerOptions & { headless?: boolean }, exitOnClose?: boolean) {
if (!validateTraceUrls(traceUrls))
if (!await validateTraceUrls(traceUrls))
return;
const server = await startTraceViewerServer(options);
await installRootRedirect(server, traceUrls, options);
@ -157,7 +157,7 @@ export async function runTraceViewerApp(traceUrls: string[], browserName: string
}
export async function runTraceInBrowser(traceUrls: string[], options: TraceViewerServerOptions) {
if (!validateTraceUrls(traceUrls))
if (!await validateTraceUrls(traceUrls))
return;
const server = await startTraceViewerServer(options);
await installRootRedirect(server, traceUrls, options);