Prevent Accidental "Theme Push" to Live Theme

Hey, is it possible to prevent a theme from being accidentally pushed to a live theme? The default behavior seems to open a CLI interface to select the theme (live or unpublished) and then you choose the one you want. The only problem is, I’m worried about mistakenly overriding a live theme. Any tips or solutions to avoid this?

hey @devenini

I don’t think there is a particular way to prevent it.

When you run

Shopify theme push

There will be a step to choose between live or unpublished as you mentioned, and after that there will be another step to confirm. These two steps already seem to me as kind of protection :slight_smile:

You always can use

Shopify theme push --unpublished

This way you can be sure that you are not touching a live theme.

Another approach I’d suggest is use git and github and push all changes there and then link your repo to you store. This approach will give you a bit of extra safety.

Could be an idea to update the CLI to either change the order or at least not have the live theme preselected.

Will probably cause other UX issues, and having it at the bottom would often also be a hassle.

A confirmation dialog when selecting live? “Are you sure…?”.

Dont even know if its a general problem. Personally I’ve never clicked it unintentionally :smiley:

1 Like