-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme check action fails if no lintable files were changed in a pull request #28
Comments
@MauriceArikoglu I was able to debug this a bit more and went down a rabbit hole. It seems theme-check returns a few 'offences' when no lintable files are found. Since the theme-check action runs on changed files (see https://github.com/Shopify/theme-check-action/blob/main/entrypoint.sh#L67), the default theme-check categories attempt to run. The changed files are saved to
which results in exit code 1, indicating a fail even though that's not necessarily true (in some cases). So in my case, I'm updating a I was able to 'solve' this by capturing the output of theme-check and checking for Example (from theme-check-action/entrypoint.sh Line 62 in 81e511e
It's not the most elegant solution, but this resolves the issue. Open to discussion on this, thanks! |
@snacsnoc Thank you Easton, for digging into this and providing a workaround. I came to a similar conclusion with the changed files, but did not dig deep enough to find a suitable workaround. Would be nice to add this to a caveats section or refactor the action appropriately. Have a good day and best wishes for your 2024. |
https://github.com/Shopify/theme-check-action/blob/fc581c95120e0db82b86ae6fa8c507cba7648aba/entrypoint.sh#LL62C1-L63C8
If no lintable files are found the exit code from the theme-check call causes the action to fail, even though no errors and no warnings were found.
The text was updated successfully, but these errors were encountered: