Can a Shopify theme deploy even when your safety check fails?

A theme change can look safe right up until it reaches the store.
You run a check. It reports a problem. Then the theme still deploys.
That sounds impossible if you think of a safety check as a gate. But a check is only a gate when your command or deployment setup treats it like one.
We found this in our own deploy process. We had written a safety check meant to block bad deploys. One line used a semicolon where it needed `and`. The build failed, but the deploy command still ran.
The broken theme shipped because the second command was allowed to run regardless of the first result.
That was a useful reminder: a safety check is not the same thing as a blocked deployment.
Theme Check can report errors without stopping a push
Shopify Theme Check looks through theme code for known issues. Shopify lists examples including parser-blocking scripts, inconsistent translation files, and missing templates.
It is useful. It is not a full storefront test.
A Theme Check result also does not automatically stop every deployment. The command can be configured to fail at different severity levels:
- `error`
- `suggestion`
- `style`
The chosen level decides when the command exits with code `1`, which is the signal automation usually reads as failure.
That still leaves a separate question: what does your deploy command do after the check fails?
If the next command runs anyway, the theme can still be uploaded.
Here is the shape of the mistake we made:
```sh run-safety-check; shopify theme push ```
The semicolon separates two commands. The push is attempted after the check, whether the check passed or failed.
If your intention is “push only if the check passes,” make that condition explicit:
```sh run-safety-check && shopify theme push ```
In this version, `shopify theme push` runs only when the first command succeeds.
If you do not write deploy scripts yourself, the same question applies to your agency, developer, or CI setup: what specifically prevents the push after a failed check?
“Theme Check runs in the pipeline” is not quite an answer.
Shopify CLI does not make strict checking the default
Shopify CLI's `shopify theme push` uploads your local theme files to Shopify. By default, it can push even when Theme Check reports errors.
To require Theme Check to pass before the push, use:
```sh shopify theme push --strict ```
With `--strict`, Shopify requires Theme Check to complete without errors before it pushes the theme.
Warnings are still allowed.
That distinction matters. A warning can point to something worth reviewing, but it does not block a strict push. An error does.
For an automated deployment, Shopify also provides the `SHOPIFY_FLAG_STRICT_PUSH` environment variable. That gives a CI job the same strict-push behaviour without adding the flag directly to every command.
A simple deployment step might look like this:
```sh shopify theme push --strict --unpublished ```
This does two useful things:
- `--strict` stops the upload when Theme Check finds errors.
- `--unpublished` sends the code to a new unpublished theme rather than your live one.
That is a safer default than treating every change as ready for customers.
Uploading a theme is not the same as publishing it
It helps to separate two actions that are often bundled together in casual conversation.
`shopify theme push` uploads code to a Shopify theme.
`shopify theme publish` makes a theme live.
You can push a theme for review without replacing the live theme. You can also push to a development theme while work is in progress.
This gives you a useful sequence:
1. Run checks locally or in CI. 2. Push to an unpublished or development theme. 3. Open that theme and test the actual storefront. 4. Publish only when you are satisfied.
The strict flag belongs to the push step. Publishing is a separate operation after code has already been pushed.
So do not assume a publish command will somehow re-run the same checks or enforce the same rules. Make the checks part of the process before publishing.
A passing Theme Check is not proof that the storefront works
Theme Check catches code patterns and theme issues it knows how to identify. That is valuable, but it cannot tell you everything a customer will experience.
Our mobile check on lunalink.ai is a good example of why.
We found every page could scroll sideways by 59 pixels on a phone viewport. The navigation needed 430 pixels, while the phone viewport gave it 375. We had looked at the site dozens of times, but not in that viewport.
A code check alone would not replace opening the store on a narrow screen and trying it.
After a theme push, check the parts customers actually use:
- Open the homepage on a phone-width viewport.
- Open a product page with a real product selected.
- Add that product to cart.
- Change quantity and remove an item.
- Search for a product.
- Open the menu and footer links.
- Visit a policy page.
- Test any template changed in the deploy.
You do not need a long test plan for every copy edit. But any change to layout, cart behaviour, navigation, product forms, or scripts deserves a quick real-world pass.
Check your current setup in under a minute
If you have access to the theme repository, search for `theme push`.
You are looking for one of these:
```sh shopify theme push --strict ```
or:
```sh SHOPIFY_FLAG_STRICT_PUSH=1 ```
Then look at the command before it.
If you see a semicolon between the check and the deploy, ask whether that is intentional. If the push must stop after a failed check, use `&&` or let the CI system fail the job before it reaches the deploy step.
Also check where the theme is pushed. A command using `--unpublished` or `--development` gives you a review step. A command that targets the live theme needs more care.
If someone else manages deployments, send them one plain question: “When Theme Check finds an error, can this workflow still push code to Shopify?”
The answer should be visible in the command, not based on memory.
Make the guardrail real
A safety check only protects the store when a failed result changes what happens next.
For Shopify themes, that means setting a failure level you understand, using `shopify theme push --strict` where errors should block uploads, and keeping publishing separate from review.
Then open the unpublished theme and use it like a customer would.
The next step is simple: find your theme push command and check whether it includes `--strict` and a safe destination.