From 4dc0927104dc7943a6b8fc3f0c860194e16554a1 Mon Sep 17 00:00:00 2001 From: Reece Browne <74901996+reecebrowne@users.noreply.github.com> Date: Wed, 29 Jul 2026 18:08:08 +0100 Subject: [PATCH] a11y job: emit the affected-story list on one line (#7196) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What Fixes the a11y check failing with `permission denied` on any PR that touches more than one story (currently hitting #7163). The script that lists which stories to scan printed one path per line. That list gets pasted into a shell command, so everything after the first line fell out of the command — the shell treated the second path as a command of its own and failed. One-line fix: print the list on a single line. ## Testing Changed two components and ran the task from both git-bash and PowerShell — both stories scanned, check passes. #7163's red check should go green on re-run once this is in. --- frontend/.storybook/a11y-changed.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/.storybook/a11y-changed.mjs b/frontend/.storybook/a11y-changed.mjs index 6aacf6274c..5ff7a9e633 100644 --- a/frontend/.storybook/a11y-changed.mjs +++ b/frontend/.storybook/a11y-changed.mjs @@ -45,4 +45,12 @@ for (const f of changed) { if (existsSync(s)) stories.add(s); } -process.stdout.write([...stories].sort().join("\n")); +// One line, each path quoted: the output is interpolated into a task command, +// where a newline would end the command after the first story and an unquoted +// space would split a path into two arguments. +process.stdout.write( + [...stories] + .sort() + .map((s) => `"${s}"`) + .join(" "), +);