From 9e90c27180c7b2d0703d28f2b6e2902995e25718 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 13 Nov 2023 22:11:00 +0800 Subject: [PATCH] Merge pull request #24825 from storybookjs/yann/log-benchmark-error Build: Log benchmark task error (cherry picked from commit 36b2baf63f2294ad50cde6053859698c9fd38f59) --- scripts/tasks/bench.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/tasks/bench.ts b/scripts/tasks/bench.ts index 25325e1090e0..664f345d541e 100644 --- a/scripts/tasks/bench.ts +++ b/scripts/tasks/bench.ts @@ -6,6 +6,8 @@ import { PORT as servePort, serve } from './serve'; // eslint-disable-next-line @typescript-eslint/no-implied-eval const dynamicImport = new Function('specifier', 'return import(specifier)'); +const logger = console; + export const bench: Task = { description: 'Run benchmarks against a sandbox in dev mode', dependsOn: ['build'], @@ -72,6 +74,10 @@ export const bench: Task = { } }); } catch (e) { + logger.log( + `An error occurred while running the benchmarks for the ${details.sandboxDir} sandbox` + ); + logger.error(e); controllers.forEach((c) => c.abort()); throw e; }