Report missing Theme Check config files as expected errors - #8257
Merged
Conversation
alexanderMontague
marked this pull request as ready for review
August 6, 2026 16:40
alexanderMontague
enabled auto-merge
August 6, 2026 19:09
gonzaloriestra
disabled auto-merge
August 7, 2026 06:36
Translate an ENOENT for the explicitly selected Theme Check config into AbortError for check, --print, and --list. This gives developers actionable output and classifies the failure as expected instead of reporting it to Bugsnag and Observe. Continue re-raising missing extended configs, unrelated missing files, and non-ENOENT I/O failures so genuine CLI defects remain visible. Closes shop/issues#71880
gonzaloriestra
force-pushed
the
alex/fix-theme-check-missing-config
branch
from
August 7, 2026 06:38
27a5aca to
81c77bf
Compare
gonzaloriestra
enabled auto-merge
August 7, 2026 06:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Report an explicitly selected but missing Theme Check configuration file as an expected CLI error instead of sending an unhandled filesystem error to Bugsnag and Observe.
Context
Observe error group 1547901448068571580 recorded 11 events over the inspected 30-day window, affecting 11 stable sessions. The error was consistently
ENOENT: no such file or directory, open '<path>/.theme-check.yml'from@shopify/theme-check-nodeafter the user supplied--config=./.theme-check.yml. The issue snapshot recorded 7 events affecting 7 users over seven days.The Theme Check library correctly raises
ENOENTwhen an explicit root config does not exist, but Shopify CLI treated that raw Node error as an unexpected bug. The command should still exit unsuccessfully and explain the missing file; it should not report expected invalid input as a product defect.Closes https://github.com/shop/issues/issues/71880
Changes
ENOENTintoAbortErroronly when the missing path matches the explicitly selected root configuration file.--print, and--list.extendsfiles, unrelated missing files, permission errors, and all other I/O failures.@shopify/theme.Tophatting
pnpm exec vitest run packages/theme/src/cli/services/check.test.ts packages/theme/src/cli/commands/theme/check.test.ts— 24 tests passed after rebasing onto currentmain.@shopify/themetest suite — 576 tests passed.dev check— type-check and lint passed.pnpm nx build cli— passed.theme check,theme check --print, andtheme check --listwith a missing explicit config; each printedTheme Check config file not found: <path>, omitted a stack trace, and exited with status 1.Generated with Pi. Vetted by Me.
Generated with Pi. Vetted by Me.