Skip to content

Commit 3de3f02

Browse files
osho-20claude
andcommitted
fix(accessibility): preserve build-start exception log on glob.sync failure (SDK-7121)
Addresses PR #1160 review r3682515873: switching the support-file glob to glob.sync dropped the distinctive 'EXCEPTION IN BUILD START EVENT' log that the removed async callback emitted on a parse error. Wrap glob.sync in its own try/catch to restore that signal (now with the error object attached) while keeping the call synchronous to avoid the archive race. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent fed11f7 commit 3de3f02

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

bin/accessibility-automation/helper.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,13 @@ exports.setAccessibilityEventListeners = (bsConfig) => {
381381
// Synchronous for the same reason as testObservability setEventListeners
382382
// (SDK-7121): the caller archives the suite right after this returns, so an
383383
// async glob callback would race the archive and ship un-instrumented specs.
384-
const files = glob.sync(globPattern, {});
384+
let files;
385+
try {
386+
files = glob.sync(globPattern, {});
387+
} catch(err) {
388+
logger.debug('EXCEPTION IN BUILD START EVENT : Unable to parse cypress support files', true, err);
389+
return;
390+
}
385391
files.forEach(file => {
386392
try {
387393
const fileName = path.basename(file);

0 commit comments

Comments
 (0)